diff options
-rw-r--r-- | kvmd.install | 11 | ||||
-rwxr-xr-x | scripts/kvmd-certbot | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/kvmd.install b/kvmd.install index 2241db4a..6f3339e1 100644 --- a/kvmd.install +++ b/kvmd.install @@ -34,9 +34,14 @@ post_upgrade() { for target in nginx vnc; do chown root:root /etc/kvmd/$target/ssl - chown root:kvmd-$target /etc/kvmd/$target/ssl/* - chmod 440 /etc/kvmd/$target/ssl/server.key - chmod 444 /etc/kvmd/$target/ssl/server.crt + if [ -f /etc/kvmd/$target/ssl/server.key ]; then + chown root:kvmd-$target /etc/kvmd/$target/ssl/server.key + chmod 440 /etc/kvmd/$target/ssl/server.key + fi + if [ -f /etc/kvmd/$target/ssl/server.crt ]; then + chown root:kvmd-$target /etc/kvmd/$target/ssl/server.crt + chmod 444 /etc/kvmd/$target/ssl/server.crt + fi done echo "==> Patching configs ..." diff --git a/scripts/kvmd-certbot b/scripts/kvmd-certbot index 72adb8e2..54c6a570 100755 --- a/scripts/kvmd-certbot +++ b/scripts/kvmd-certbot @@ -62,7 +62,7 @@ if [ "$1" == "renew" ]; then rm -rf '$new' cp -a '$tmp' '$new' rm '$new/updated' - chmod 750 '$new/config/'{archive,live} + chmod 755 '$new/config/'{archive,live} chmod 640 '$new'/config/archive/*/privkey*.pem sed -s -i -e 's| = $tmp/| = $cur/|g' '$new/config/renewal/'* sync |