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
|
||||
|
||||
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
|
||||
set +e
|
||||
eval hash "composer" 2>/dev/null
|
||||
|
@ -372,7 +389,7 @@ if [ -f /etc/airtime/airtime.conf ]; then
|
|||
set +e
|
||||
verbose "Stopping airtime services..."
|
||||
loudCmd "service airtime-playout stop"
|
||||
loudCmd "service airtime-media-monitor stop"
|
||||
loudCmd "service airtime-celery stop"
|
||||
loudCmd "service airtime_analyzer stop"
|
||||
loudCmd "service airtime-liquidsoap stop"
|
||||
verbose "...Done"
|
||||
|
@ -568,14 +585,14 @@ fi
|
|||
# Add celery to the www-data group
|
||||
loudCmd "usermod -G ${web_user} -a celery"
|
||||
|
||||
if [ "$dist" = "ubuntu" ]; then
|
||||
if [ "$dist" = "ubuntu" ] && [ "$code" != "xenial" ] ; then
|
||||
loudCmd "initctl reload-configuration"
|
||||
fi
|
||||
verbose "...Done"
|
||||
|
||||
verbose "\n * Installing airtime_analyzer..."
|
||||
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"
|
||||
fi
|
||||
verbose "...Done"
|
||||
|
@ -587,8 +604,10 @@ for i in /etc/init/airtime*.template; do
|
|||
done
|
||||
|
||||
set +e
|
||||
if [ "$dist" = "ubuntu" ]; then
|
||||
if [ "$dist" = "ubuntu" ] && [ "$code" != "xenial" ] ; then
|
||||
loudCmd "initctl reload-configuration"
|
||||
elif [ "$dist" = "ubuntu" ] && [ "$code" = "xenial" ]; then
|
||||
loudCmd "systemctl restart celery"
|
||||
fi
|
||||
|
||||
# airtime-celery only has an init.d startup script
|
||||
|
@ -655,10 +674,11 @@ fi
|
|||
# Enable Apache modules
|
||||
if [ "$dist" != "centos" ] && [ "$code" != "xenial" ]; then
|
||||
loudCmd "a2enmod rewrite php5"
|
||||
elif [ "$dist" == "ubuntu" ] && [ "$code" == "xenial" ]; then
|
||||
loudCmd "a2enmod rewrite php7.0"
|
||||
elif [ "$dist" = "ubuntu" ] && [ "$code" = "xenial" ]; then
|
||||
loudCmd "a2enmod rewrite"
|
||||
loudCmd "a2enmod php7.0"
|
||||
fi
|
||||
|
||||
exit
|
||||
loud "\n-----------------------------------------------------"
|
||||
loud " * Configuring PostgreSQL * "
|
||||
loud "-----------------------------------------------------"
|
||||
|
|
Loading…
Reference in New Issue