-
Notifications
You must be signed in to change notification settings - Fork 8
/
setconfig_aircast.sh
30 lines (27 loc) · 1.04 KB
/
setconfig_aircast.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# Dynamically generates the config_aircast.xml file
# Various settings below will be obtained from the environment if the variables are set,
# otherwise the defaults will be used.
echo "<?xml version=\"1.0\"?>"
echo "<aircast>"
echo " <common>"
echo " <enabled>1</enabled>"
echo " <max_volume>100</max_volume>"
echo " <codec>${CODEC:-flc}</codec>"
echo " <metadata>${METADATA:-1}</metadata>"
echo " <artwork>https://raw.githubusercontent.com/pwt/docker-airconnect-arm/master/airconnect-logo.png</artwork>"
echo " <latency>${LATENCY:-1000:1000:f}</latency>"
echo " <drift>${DRIFT:-1}</drift>"
echo " <max_players>${MAX_PLAYERS:-32}</max_players>"
if [ "$SUPPRESS_FLUSH" ]
then
echo " <flush>0</flush>"
else
echo " <flush>1</flush>"
fi
echo " </common>"
echo " <main_log>${MAIN_LOG:-info}</main_log>"
echo " <util_log>${UTIL_LOG:-warn}</util_log>"
echo " <raop_log>${RAOP_LOG:-warn}</raop_log>"
echo " <log_limit>2</log_limit>"
echo "</aircast>"