commit 355c28ddbb591a92a143e233c061e9db9494be2a
Author: Arkadiusz Miƛkiewicz <[email protected]>
Date:   Sat Aug 13 10:13:38 2016 +0200

    - keep copy of old cert in case if it wasn't letsencrypt one

 hook.sh | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/hook.sh b/hook.sh
index 66975c3..6210d40 100755
--- 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
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/letsencrypt.sh.git/commitdiff/355c28ddbb591a92a143e233c061e9db9494be2a

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to