summaryrefslogtreecommitdiffstats
path: root/dehydrated/share/hooks/exit_hook.service-reload
diff options
context:
space:
mode:
Diffstat (limited to 'dehydrated/share/hooks/exit_hook.service-reload')
-rwxr-xr-xdehydrated/share/hooks/exit_hook.service-reload17
1 files changed, 17 insertions, 0 deletions
diff --git a/dehydrated/share/hooks/exit_hook.service-reload b/dehydrated/share/hooks/exit_hook.service-reload
new file mode 100755
index 0000000..2da8c1b
--- /dev/null
+++ b/dehydrated/share/hooks/exit_hook.service-reload
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+echo " + Reloading services..."
+
+for SERVICE in apache2 haproxy postgresql redis-server
+do
+ if service ${SERVICE} status > /dev/null 2>&1
+ then
+ echo -n " + ${SERVICE}:"
+
+ service ${SERVICE} reload || service ${SERVICE} restart
+
+ echo " done."
+ fi
+done