From 4be7699eec2100ab0caf6e6235f7c9306e52b442 Mon Sep 17 00:00:00 2001 From: Robb Ebright Date: Thu, 9 Jan 2020 08:36:52 -0500 Subject: [PATCH] made sure that icecast pass is not changed upon upgrade or reprovision --- install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install b/install index 613597a22..bb62d98b1 100755 --- a/install +++ b/install @@ -906,7 +906,7 @@ if [ "$icecast" = "t" ]; then icecast_config="/etc/icecast.xml" fi # only update icecast password if - if [ ! -f "/etc/airtime/airtime.conf" ]; then + if [ ! -f "/etc/airtime/airtime.conf" ] && [ !-f "/etc/airtime/airtime.conf.tmp" ]; then icecast_pass=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-12};) echo $icecast_pass > /tmp/icecast_pass loud "\n New install detected setting icecast password to random value." @@ -1120,7 +1120,7 @@ if [ ! -d "/etc/airtime" ]; then mkdir /etc/airtime fi -if [ ! -f "/etc/airtime/airtime.conf" ]; then +if [ ! -f "/etc/airtime/airtime.conf" ] && [ !-f "/etc/airtime/airtime.conf.tmp" ]; then # 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 fi