If we are about to reboot anyway then don't bother restarting daemons
This commit is contained in:
parent
c49e53eaee
commit
6c302f075b
|
@ -244,6 +244,21 @@ else
|
|||
turn_off_rsys_logging
|
||||
fi
|
||||
|
||||
if [ -d /etc/exim4 ]; then
|
||||
update-exim4.conf.template -r
|
||||
update-exim4.conf
|
||||
dpkg-reconfigure --frontend noninteractive exim4-config
|
||||
fi
|
||||
|
||||
if [[ "$2" == "--reboot"* || "$2" == "--restart"* ]]; then
|
||||
# if we are rebooting anyway then there is no need to
|
||||
# restart the daemons
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -d /etc/exim4 ]; then
|
||||
systemctl restart exim4
|
||||
fi
|
||||
systemctl restart syslog
|
||||
if [ -d /etc/tor ]; then
|
||||
if [[ "$2" != "--onion" ]]; then
|
||||
|
@ -260,12 +275,6 @@ fi
|
|||
if [ -d /etc/prosody ]; then
|
||||
systemctl restart prosody
|
||||
fi
|
||||
if [ -d /etc/exim4 ]; then
|
||||
update-exim4.conf.template -r
|
||||
update-exim4.conf
|
||||
dpkg-reconfigure --frontend noninteractive exim4-config
|
||||
systemctl restart exim4
|
||||
fi
|
||||
if [ -d /etc/dovecot ]; then
|
||||
systemctl restart dovecot
|
||||
fi
|
||||
|
|
|
@ -72,17 +72,17 @@ $(get_ssh_server_key)
|
|||
echo ''
|
||||
echo $'Shutting down the system. Detatch the ethernet cable, attach wifi dongle, then power on again.'
|
||||
echo ''
|
||||
${PROJECT_NAME}-logging off
|
||||
${PROJECT_NAME}-logging off --restart
|
||||
systemctl poweroff
|
||||
return
|
||||
fi
|
||||
echo $'Turning off logging'
|
||||
${PROJECT_NAME}-logging off
|
||||
${PROJECT_NAME}-logging off --restart
|
||||
echo $'Rebooting the system'
|
||||
systemctl reboot -i
|
||||
fi
|
||||
echo $'Turning off logging'
|
||||
${PROJECT_NAME}-logging off
|
||||
${PROJECT_NAME}-logging off --restart
|
||||
}
|
||||
|
||||
function update_installed_apps_list {
|
||||
|
|
Loading…
Reference in New Issue