diff options
Diffstat (limited to 'roles/web/files')
-rwxr-xr-x | roles/web/files/deploy.sh | 8 |
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 |