aboutsummaryrefslogtreecommitdiffstats
path: root/roles/web
diff options
context:
space:
mode:
Diffstat (limited to 'roles/web')
-rwxr-xr-xroles/web/files/deploy.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/roles/web/files/deploy.sh b/roles/web/files/deploy.sh
index 6c503d6..9c6fff2 100755
--- a/roles/web/files/deploy.sh
+++ b/roles/web/files/deploy.sh
@@ -12,6 +12,10 @@
SERVICES="nginx dovecot postfix"
for srv in ${SERVICES}; do
- echo "ACME deploy: restarting ${srv} ..."
- service ${srv} restart
+ if service ${srv} status >/dev/null 2>&1; then
+ echo "ACME deploy: restarting ${srv} ..."
+ service ${srv} restart
+ else
+ echo "ACME deploy: service ${srv} not running"
+ fi
done