Merge pull request #953 from paddatrapper/fix-installer
Fix existing config check in install
This commit is contained in:
commit
6678645f0a
4
install
4
install
|
@ -906,7 +906,7 @@ if [ "$icecast" = "t" ]; then
|
||||||
icecast_config="/etc/icecast.xml"
|
icecast_config="/etc/icecast.xml"
|
||||||
fi
|
fi
|
||||||
# only update icecast password if
|
# only update icecast password if
|
||||||
if [ ! -f "/etc/airtime/airtime.conf" ] && [ !-f "/etc/airtime/airtime.conf.tmp" ]; then
|
if [ ! -e "/etc/airtime/airtime.conf" ] && [ ! -e "/etc/airtime/airtime.conf.tmp" ]; then
|
||||||
icecast_pass=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-12};)
|
icecast_pass=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-12};)
|
||||||
echo $icecast_pass > /tmp/icecast_pass
|
echo $icecast_pass > /tmp/icecast_pass
|
||||||
loud "\n New install detected setting icecast password to random value."
|
loud "\n New install detected setting icecast password to random value."
|
||||||
|
@ -1121,7 +1121,7 @@ if [ ! -d "/etc/airtime" ]; then
|
||||||
mkdir /etc/airtime
|
mkdir /etc/airtime
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "/etc/airtime/airtime.conf" ] && [ !-f "/etc/airtime/airtime.conf.tmp" ]; then
|
if [ ! -e "/etc/airtime/airtime.conf" ] && [ ! -e "/etc/airtime/airtime.conf.tmp" ]; then
|
||||||
# need to copy the icecast_pass from temp to /etc/airtime so web-based installer can read it
|
# need to copy the icecast_pass from temp to /etc/airtime so web-based installer can read it
|
||||||
cp /tmp/icecast_pass /etc/airtime/icecast_pass
|
cp /tmp/icecast_pass /etc/airtime/icecast_pass
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue