From 91f44936817919f510ae98092c135a564a41bd7e Mon Sep 17 00:00:00 2001 From: "John \"Elwin\" Edwards" Date: Fri, 14 Dec 2018 16:24:37 -0500 Subject: [PATCH] Certificate post-hook script: add option to restart lighttpd. --- scripts/create-combined-pemfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/create-combined-pemfile b/scripts/create-combined-pemfile index 06c8561..2f8da77 100755 --- a/scripts/create-combined-pemfile +++ b/scripts/create-combined-pemfile @@ -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