Certificate post-hook script: add option to restart lighttpd.
This commit is contained in:
parent
413dbfc6cc
commit
91f4493681
1 changed files with 13 additions and 0 deletions
|
|
@ -8,6 +8,14 @@ then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$1" = "-r" ]
|
||||||
|
then
|
||||||
|
RESTART=1
|
||||||
|
shift
|
||||||
|
else
|
||||||
|
RESTART=0
|
||||||
|
fi
|
||||||
|
|
||||||
for DOMAIN in "$@"
|
for DOMAIN in "$@"
|
||||||
do
|
do
|
||||||
LINKDIR=/etc/letsencrypt/live/"$DOMAIN"
|
LINKDIR=/etc/letsencrypt/live/"$DOMAIN"
|
||||||
|
|
@ -24,3 +32,8 @@ do
|
||||||
cat "$LINKDIR"/privkey.pem "$LINKDIR"/cert.pem >"$PEMFILE"
|
cat "$LINKDIR"/privkey.pem "$LINKDIR"/cert.pem >"$PEMFILE"
|
||||||
ln -s -f -r "$PEMFILE" "$LINKDIR"/combined.pem
|
ln -s -f -r "$PEMFILE" "$LINKDIR"/combined.pem
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ "$RESTART" = 1 ]
|
||||||
|
then
|
||||||
|
systemctl restart lighttpd
|
||||||
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue