Certificate post-hook script: add option to restart lighttpd.

This commit is contained in:
John "Elwin" Edwards 2018-12-14 16:24:37 -05:00
parent 413dbfc6cc
commit 91f4493681

View file

@ -8,6 +8,14 @@ then
exit 1
fi
if [ "$1" = "-r" ]
then
RESTART=1
shift
else
RESTART=0
fi
for DOMAIN in "$@"
do
LINKDIR=/etc/letsencrypt/live/"$DOMAIN"
@ -24,3 +32,8 @@ do
cat "$LINKDIR"/privkey.pem "$LINKDIR"/cert.pem >"$PEMFILE"
ln -s -f -r "$PEMFILE" "$LINKDIR"/combined.pem
done
if [ "$RESTART" = 1 ]
then
systemctl restart lighttpd
fi