summaryrefslogtreecommitdiff
path: root/rotate-keys.in
diff options
context:
space:
mode:
Diffstat (limited to 'rotate-keys.in')
-rw-r--r--rotate-keys.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/rotate-keys.in b/rotate-keys.in
index 724ea24..6116d9d 100644
--- a/rotate-keys.in
+++ b/rotate-keys.in
@@ -6,6 +6,9 @@ if [ -r '#ETCDIR#/simple-pki/cb.conf' ]; then
. '#ETCDIR#/simple-pki/cb.conf'
fi
+me=$(readlink -e "$0")
+cd /
+
hosts=$(
find '#ETCDIR#/nginx/' \
-name keys -prune , \
@@ -61,7 +64,7 @@ if [ "$(whoami)" != "${certificate_user}" ]; then
systemctl try-restart nginx
fi
- su "${certificate_user}" -s /bin/bash -c "$0"
+ su "${certificate_user}" -s /bin/bash -c "${me}"
fi
exit