summaryrefslogtreecommitdiffstats
path: root/bin/exit_hook.fix-permissions.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xbin/exit_hook.fix-permissions.sh15
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