fixed installer to not change pass during upgrade and add centos support
This commit is contained in:
parent
f42f331c29
commit
336e7d82b1
21
install
21
install
|
@ -891,15 +891,20 @@ if [ "$icecast" = "t" ]; then
|
|||
icecast_unit_name="icecast2"
|
||||
if [ "$dist" != "centos" ]; then
|
||||
sed -i 's/ENABLE=false/ENABLE=true/g' /etc/default/icecast2
|
||||
icecast_config="/etc/icecast2/icecast.xml"
|
||||
else
|
||||
icecast_unit_name="icecast"
|
||||
icecast_config="/etc/icecast.xml"
|
||||
fi
|
||||
# only update icecast password if
|
||||
if [ ! -f "/etc/airtime/airtime.conf" ]; 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."
|
||||
xmlstarlet ed --inplace -u /icecast/authentication/source-password -v $icecast_pass $icecast_config
|
||||
xmlstarlet ed --inplace -u /icecast/authentication/relay-password -v $icecast_pass $icecast_config
|
||||
xmlstarlet ed --inplace -u /icecast/authentication/admin-password -v $icecast_pass $icecast_config
|
||||
fi
|
||||
icecast_pass=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-12};)
|
||||
echo $icecast_pass > /tmp/icecast_pass
|
||||
xmlstarlet ed --inplace -u /icecast/authentication/source-password -v $icecast_pass /etc/icecast2/icecast.xml
|
||||
xmlstarlet ed --inplace -u /icecast/authentication/relay-password -v $icecast_pass /etc/icecast2/icecast.xml
|
||||
xmlstarlet ed --inplace -u /icecast/authentication/admin-password -v $icecast_pass /etc/icecast2/icecast.xml
|
||||
|
||||
# restart in case icecast was already started (like is the case on debian)
|
||||
systemInitCommand restart ${icecast_unit_name}
|
||||
verbose "...Done"
|
||||
|
@ -1104,10 +1109,10 @@ if [ ! -d "/etc/airtime" ]; then
|
|||
|
||||
verbose "\n * Creating /etc/airtime/ directory..."
|
||||
mkdir /etc/airtime
|
||||
# need to copy the icecast_pass from temp to /etc/airtime so installer can read it
|
||||
cp /tmp/icecast_pass /etc/airtime/icecast_pass
|
||||
fi
|
||||
|
||||
# need to copy the icecast_pass from temp to /etc/airtime so installer can read it
|
||||
cp /tmp/icecast_pass /etc/airtime/icecast_pass
|
||||
|
||||
|
||||
chown -R ${web_user}:${web_user} /etc/airtime
|
||||
|
|
|
@ -86,7 +86,7 @@ yum install -y \
|
|||
policycoreutils-python \
|
||||
python-celery \
|
||||
python2-pika \
|
||||
lsof \
|
||||
lsof \
|
||||
xmlstarlet
|
||||
|
||||
# for pip ssl install
|
||||
|
|
Loading…
Reference in New Issue