diff options
Diffstat (limited to '')
-rwxr-xr-x | bin/exit_hook.fix-permissions.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/exit_hook.fix-permissions.sh b/bin/exit_hook.fix-permissions.sh new file mode 100755 index 0000000..74074cd --- /dev/null +++ b/bin/exit_hook.fix-permissions.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +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 {} \; + + chown -R root:ssl-cert /var/lib/dehydrated/certs + + echo " done." +fi |