]> git.pld-linux.org Git - packages/dehydrated.git/commitdiff
- keep copy of old cert in case if it wasn't letsencrypt one
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 13 Aug 2016 08:13:38 +0000 (10:13 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 13 Aug 2016 08:13:38 +0000 (10:13 +0200)
hook.sh

diff --git a/hook.sh b/hook.sh
index 66975c31d70076500778663216ace6b7c2257ff0..6210d401cbee22b87ca00cfdb27cbfe45e702596 100755 (executable)
--- a/hook.sh
+++ b/hook.sh
@@ -10,6 +10,7 @@ deploy_cert)
        TIMESTAMP="$7"
        if [ -x /usr/sbin/lighttpd -a -f /etc/lighttpd/server.pem ]; then
                echo " + Hook: Overwritting /etc/lighttpd/server.pem and reloading lighttpd..."
+               cp -a /etc/lighttpd/server.pem /etc/lighttpd/server.pem.letsencrypt~
                cat "$FULLCHAINCERT" "$PRIVKEY" > /etc/lighttpd/server.pem
                /sbin/service lighttpd reload
        fi
@@ -17,6 +18,8 @@ deploy_cert)
                nginx="nginx-standard"
                [ -x /etc/rc.d/init.d/nginx-light ] && nginx="nginx-light"
                echo " + Hook: Overwritting /etc/nginx/server.{pem,key} and reloading nginx..."
+               cp -a /etc/nginx/server.pem /etc/nginx/server.pem.letsencrypt~
+               cp -a /etc/nginx/server.key /etc/nginx/server.key.letsencrypt~
                cat "$FULLCHAINCERT" > /etc/nginx/server.pem
                cat "$PRIVKEY" > /etc/nginx/server.key
                /sbin/service "$nginx" reload
This page took 0.043473 seconds and 4 git commands to generate.