Skip to content
Snippets Groups Projects
Commit 6c302f07 authored by Bob Mottram's avatar Bob Mottram
Browse files

If we are about to reboot anyway then don't bother restarting daemons

parent c49e53ea
No related branches found
No related tags found
No related merge requests found
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment