blob: 5e5ad4d50bb4c99a8a661da34ea9e304573f78d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/sh -e
#
# Restart the services after renewing the certificate(s) to deploy the
# changed certificate(s).
#
# This script will be weekly executed. See "/etc/periodic.conf".
#
# Aaron LI
#
# Services to be restarted after ACME certificate update
SERVICES="nginx dovecot postfix"
printf "-------------------------------------------------------------\n"
for srv in ${SERVICES}; do
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
|