summaryrefslogtreecommitdiffstats
path: root/dehydrated/share/hooks/exit_hook.fix-permissions
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2022-07-07 10:58:19 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2022-07-07 14:14:23 +0000
commit2e852589704b0c753fa73200ebc3e8172ec239e3 (patch)
treea77265ccc7aaea9a6cb4e0a1a4072f9889c62097 /dehydrated/share/hooks/exit_hook.fix-permissions
parentReworking service-reload dehydrated hook. (diff)
downloadservice-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-xdehydrated/share/hooks/exit_hook.fix-permissions10
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