From d897eaf5cdb0c34888771bd8aa94fd494e67af3d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 28 Aug 2021 06:28:53 +0200 Subject: Adding dehydrated tools. Signed-off-by: Daniel Baumann --- dehydrated/share/hooks/exit_hook.fix-permissions | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 dehydrated/share/hooks/exit_hook.fix-permissions (limited to 'dehydrated/share/hooks/exit_hook.fix-permissions') diff --git a/dehydrated/share/hooks/exit_hook.fix-permissions b/dehydrated/share/hooks/exit_hook.fix-permissions new file mode 100755 index 0000000..c5bb646 --- /dev/null +++ b/dehydrated/share/hooks/exit_hook.fix-permissions @@ -0,0 +1,18 @@ +#!/bin/sh + +set -e + +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 {} \; + + # https://bugs.debian.org/854431 + chown -R root:ssl-cert /var/lib/dehydrated/certs + + echo " done." +fi -- cgit v1.2.3