Added info for changing Icecast passwords
This commit is contained in:
parent
f275b74c2c
commit
ac5e60b991
|
@ -297,62 +297,40 @@ A response of `ALTER ROLE` means that the command ran successfully.
|
|||
4. If all is successful, logout of PostgreSQL with `\q`, go back to */etc/airtime/airtime.conf* to edit the password
|
||||
in the config file, and restart all services mentioned in the previous section.
|
||||
|
||||
### Changing the default Icecast passwords {#icecast}
|
||||
|
||||
Random passwords are generated for Icecast during the installation. To look up and change the passwords, look in the file below.
|
||||
|
||||
`/etc/icecast2/icecast.xml`
|
||||
|
||||
Replace the admin and `changeme` field below with your own username and password.
|
||||
|
||||
```
|
||||
<authentication>
|
||||
<!-- Sources log in with username 'source' -->
|
||||
<source-password>changeme</source-password>
|
||||
<!-- Relays log in with username 'relay' -->
|
||||
<relay-password>changeme</relay-password>
|
||||
<!-- Admin logs in with the username given below -->
|
||||
<admin-user>admin</admin-user>
|
||||
<admin-password>changeme</admin-password>
|
||||
</authentication>
|
||||
```
|
||||
|
||||
Then, restart your icecast2 service.
|
||||
|
||||
```
|
||||
service icecast2 restart
|
||||
```
|
||||
|
||||
> Note: If you change the source password, you may need to manually configure Libretime to use the new password: go to **Settings** > **Streams**, set the streaming server to **Custom** and fill out the **Additional Options** below Stream 1.
|
||||
|
||||
### API client configuration {#api}
|
||||
|
||||
The LibreTime API enables many types of information about the broadcast schedule and configuration to be retrieved from the LibreTime server. Other than the live-info and week-info data fetched by website widgets (see the chapter *Exporting the schedule*), all API requests must be authenticated using the secret API key stored in the file */etc/airtime/api\_client.cfg* on the LibreTime server. This key is autogenerated during LibreTime installation and should be unique for each server.
|
||||
|
||||
If you intend to use the LibreTime API across a public network, for security reasons it is highly recommended that all API requests are sent over encrypted https: and that the web server is configured to accept requests to the api/ directory from specific host names or IP addresses only.
|
||||
|
||||
The format of API requests is:
|
||||
|
||||
https://libretime.example.com/api/api-action/format/json/api_key/XXXXXX
|
||||
|
||||
where api-action is the type of request and XXXXXX is the secret API key. Available actions include:
|
||||
|
||||
- on-air-light - return true if the station is on air
|
||||
- status - get the status of LibreTime components and resource usage
|
||||
- version - returns the version of LibreTime installed
|
||||
- get-files-without-silan-value - list files for which silence detection has not yet been performed
|
||||
- get-stream-setting - gets the settings of LibreTime output streams
|
||||
- get-stream-parameters - gets the parameters of LibreTime output streams
|
||||
|
||||
For example, using the action *get-stream-setting* returns the following output for the first configured stream:
|
||||
|
||||
{"keyname":"s1_type","value":"ogg","type":"string"},
|
||||
|
||||
{"keyname":"s1_host","value":"streaming.example.com","type":"string"},
|
||||
|
||||
{"keyname":"s1_port","value":"8000","type":"integer"},
|
||||
|
||||
{"keyname":"s1_mount","value":"airtime_128","type":"string"},
|
||||
|
||||
{"keyname":"s1_url","value":"http:\/\/airtime.sourcefabric.org","type":"string"},
|
||||
|
||||
{"keyname":"s1_description","value":"Airtime Radio! Stream
|
||||
#1","type":"string"},
|
||||
|
||||
{"keyname":"s1_genre","value":"Screamo","type":"string"},
|
||||
|
||||
which is enough information to construct a player widget dynamically. (s1\_url is the station's homepage, not the stream URL). The same information is provided with an s2\_ prefix for the second stream, and s3\_ prefix for the third stream.
|
||||
|
||||
Some API requests require the directory ID number to be specified as *dir\_id* including:
|
||||
|
||||
- list-all-files - list files in the specified directory
|
||||
- get-files-without-replay-gain - list files in the specified directory for which ReplayGain has not been calculated yet
|
||||
|
||||
For example, using a request such as:
|
||||
|
||||
http://libretime.example.com/api/list-all-files/format/json/api_key/XXXXXX/dir_id/1/
|
||||
|
||||
returns the full path to each media file in the LibreTime storage directory:
|
||||
|
||||
```
|
||||
{"files":[
|
||||
"imported\/1\/Mark Ronson feat. Saigon\/Here Comes the Fuzz\/7-Diduntdidunt-unknown.flac",
|
||||
"imported\/1\/Jimi Tenor & Tony Allen\/Inspiration Information\/3-Selfish Gene-128kbps.mp3",
|
||||
"]}
|
||||
```
|
||||
|
||||
If you have changed the *base\_url*, *base\_port* or *base\_dir* setting in */etc/airtime/airtime.conf* from the defaults, you will probably also have to update the *Hostname* settings in the file */etc/airtime/api\_client.cfg* accordingly.**
|
||||
|
||||
bin_dir = /usr/lib/airtime/api_clients
|
||||
|
|
Loading…
Reference in New Issue