changeset 88:08c6e8c87caa

Certificate post-hook script: add option to restart lighttpd.
author John "Elwin" Edwards
date Fri, 14 Dec 2018 16:24:37 -0500
parents 1bddd1839831
children 0c3e63de292c
files scripts/create-combined-pemfile
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/create-combined-pemfile	Sat Nov 24 16:47:24 2018 -0500
+++ b/scripts/create-combined-pemfile	Fri Dec 14 16:24:37 2018 -0500
@@ -8,6 +8,14 @@
 	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 @@
 	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