Skip to content

Commit eb52b92

Browse files
committed
Added restart_services function.
1 parent f412cff commit eb52b92

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

123 - lib-system-ubuntu.sh

+7
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,10 @@ function system_security_ufw_configure_basic {
100100
ufw enable
101101
}
102102

103+
function restart_services {
104+
# restarts upstart services that have a file in /tmp/needs-restart/
105+
for service_name in $(ls /tmp/restart-* | cut -d- -f2-10); do
106+
service service_name restart
107+
rm -f /tmp/restart-$service_name
108+
done
109+
}

0 commit comments

Comments
 (0)