diff options
author | Maxim Devaev <[email protected]> | 2022-06-24 18:25:08 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-06-24 18:25:08 +0300 |
commit | bd5676222bb75c8b737e61169545fe7c3028c41c (patch) | |
tree | 497892f01fefdf88ccb1102c9427fbb63a9086c0 | |
parent | 9e6edd0cd76bb43abf4f500fd3cd08e473d60a56 (diff) |
fixed permissions again
-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 |