diff options
author | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2022-07-07 10:58:19 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2022-07-07 14:14:23 +0000 |
commit | 2e852589704b0c753fa73200ebc3e8172ec239e3 (patch) | |
tree | a77265ccc7aaea9a6cb4e0a1a4072f9889c62097 /dehydrated/share/hooks | |
parent | Reworking service-reload dehydrated hook. (diff) | |
download | service-tools-2e852589704b0c753fa73200ebc3e8172ec239e3.tar.xz service-tools-2e852589704b0c753fa73200ebc3e8172ec239e3.zip |
Reworking fix-permission dehydrated hook.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-x | dehydrated/share/hooks/exit_hook.fix-permissions | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/dehydrated/share/hooks/exit_hook.fix-permissions b/dehydrated/share/hooks/exit_hook.fix-permissions index 6a1958d..4a467a7 100755 --- a/dehydrated/share/hooks/exit_hook.fix-permissions +++ b/dehydrated/share/hooks/exit_hook.fix-permissions @@ -26,17 +26,15 @@ then exit 0 fi -echo " + Fixing permissions..." - if getent group ssl-cert > /dev/null 2>&1 then - echo -n " + /var/lib/dehydrated/certs:" - - find /var/lib/dehydrated/certs -type d -exec chmod 0750 {} \; - find /var/lib/dehydrated/certs -type f -exec chmod 0640 {} \; + echo -n " + Fixing file owner and permissions..." # https://bugs.debian.org/854431 chown -R root:ssl-cert /var/lib/dehydrated/certs + find /var/lib/dehydrated/certs -type d -exec chmod 0750 {} \; + find /var/lib/dehydrated/certs -type f -exec chmod 0640 {} \; + echo " done." fi |