auto reboot added
after installing upstart it will automaticly restart
This commit is contained in:
parent
78e54eed0b
commit
6a088c5603
34
install
34
install
|
@ -349,6 +349,23 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set +e
|
||||||
|
command="initctl"
|
||||||
|
eval hash ${command} 2>/dev/null
|
||||||
|
commandFound=$?
|
||||||
|
if [[ ! ${commandFound} -eq 0 ]] && [ "$dist" == "ubuntu" ] && [ "$code" == "xenial" ]; then
|
||||||
|
verbose "\n * Reset Systemd with Upstart"
|
||||||
|
loudCmd "update-initramfs -u"
|
||||||
|
echo
|
||||||
|
echo "We detect Ubuntu Xenial on your system so we need to change systemd to Upstart to complete this we need to restart your system!"
|
||||||
|
echo "After the restart just restart the instalation."
|
||||||
|
echo -e "To reboot press any key to reboot. \c"
|
||||||
|
read IN
|
||||||
|
loudCmd "reboot"
|
||||||
|
fi
|
||||||
|
set -e
|
||||||
|
echo "Got it "
|
||||||
|
exit
|
||||||
# Check if composer exists and install if it doesn't
|
# Check if composer exists and install if it doesn't
|
||||||
set +e
|
set +e
|
||||||
eval hash "composer" 2>/dev/null
|
eval hash "composer" 2>/dev/null
|
||||||
|
@ -372,7 +389,7 @@ if [ -f /etc/airtime/airtime.conf ]; then
|
||||||
set +e
|
set +e
|
||||||
verbose "Stopping airtime services..."
|
verbose "Stopping airtime services..."
|
||||||
loudCmd "service airtime-playout stop"
|
loudCmd "service airtime-playout stop"
|
||||||
loudCmd "service airtime-media-monitor stop"
|
loudCmd "service airtime-celery stop"
|
||||||
loudCmd "service airtime_analyzer stop"
|
loudCmd "service airtime_analyzer stop"
|
||||||
loudCmd "service airtime-liquidsoap stop"
|
loudCmd "service airtime-liquidsoap stop"
|
||||||
verbose "...Done"
|
verbose "...Done"
|
||||||
|
@ -568,14 +585,14 @@ fi
|
||||||
# Add celery to the www-data group
|
# Add celery to the www-data group
|
||||||
loudCmd "usermod -G ${web_user} -a celery"
|
loudCmd "usermod -G ${web_user} -a celery"
|
||||||
|
|
||||||
if [ "$dist" = "ubuntu" ]; then
|
if [ "$dist" = "ubuntu" ] && [ "$code" != "xenial" ] ; then
|
||||||
loudCmd "initctl reload-configuration"
|
loudCmd "initctl reload-configuration"
|
||||||
fi
|
fi
|
||||||
verbose "...Done"
|
verbose "...Done"
|
||||||
|
|
||||||
verbose "\n * Installing airtime_analyzer..."
|
verbose "\n * Installing airtime_analyzer..."
|
||||||
loudCmd "python ${AIRTIMEROOT}/python_apps/airtime_analyzer/setup.py install --install-scripts=/usr/bin"
|
loudCmd "python ${AIRTIMEROOT}/python_apps/airtime_analyzer/setup.py install --install-scripts=/usr/bin"
|
||||||
if [ "$dist" = "ubuntu" ]; then
|
if [ "$dist" = "ubuntu" ] && [ "$code" != "xenial" ] ; then
|
||||||
loudCmd "initctl reload-configuration"
|
loudCmd "initctl reload-configuration"
|
||||||
fi
|
fi
|
||||||
verbose "...Done"
|
verbose "...Done"
|
||||||
|
@ -587,8 +604,10 @@ for i in /etc/init/airtime*.template; do
|
||||||
done
|
done
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
if [ "$dist" = "ubuntu" ]; then
|
if [ "$dist" = "ubuntu" ] && [ "$code" != "xenial" ] ; then
|
||||||
loudCmd "initctl reload-configuration"
|
loudCmd "initctl reload-configuration"
|
||||||
|
elif [ "$dist" = "ubuntu" ] && [ "$code" = "xenial" ]; then
|
||||||
|
loudCmd "systemctl restart celery"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# airtime-celery only has an init.d startup script
|
# airtime-celery only has an init.d startup script
|
||||||
|
@ -655,10 +674,11 @@ fi
|
||||||
# Enable Apache modules
|
# Enable Apache modules
|
||||||
if [ "$dist" != "centos" ] && [ "$code" != "xenial" ]; then
|
if [ "$dist" != "centos" ] && [ "$code" != "xenial" ]; then
|
||||||
loudCmd "a2enmod rewrite php5"
|
loudCmd "a2enmod rewrite php5"
|
||||||
elif [ "$dist" == "ubuntu" ] && [ "$code" == "xenial" ]; then
|
elif [ "$dist" = "ubuntu" ] && [ "$code" = "xenial" ]; then
|
||||||
loudCmd "a2enmod rewrite php7.0"
|
loudCmd "a2enmod rewrite"
|
||||||
|
loudCmd "a2enmod php7.0"
|
||||||
fi
|
fi
|
||||||
|
exit
|
||||||
loud "\n-----------------------------------------------------"
|
loud "\n-----------------------------------------------------"
|
||||||
loud " * Configuring PostgreSQL * "
|
loud " * Configuring PostgreSQL * "
|
||||||
loud "-----------------------------------------------------"
|
loud "-----------------------------------------------------"
|
||||||
|
|
Loading…
Reference in New Issue