summaryrefslogtreecommitdiff
path: root/rotate-keys.in
diff options
context:
space:
mode:
Diffstat (limited to 'rotate-keys.in')
-rw-r--r--rotate-keys.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/rotate-keys.in b/rotate-keys.in
index 970d533..952595b 100644
--- a/rotate-keys.in
+++ b/rotate-keys.in
@@ -82,7 +82,12 @@ if trap \
exit 1
fi
-tmp_dir=$(mktemp -d "${webserver_dir}"'/tmp.XXXXXXXXXX')
+if ! tmp_dir=$(mktemp -d "${webserver_dir}"'/tmp.XXXXXXXXXX'); then
+ >&2 printf 'failed to create temporary directory - does %s have sufficient permissions on "%s"?\n' \
+ "$(whoami)" \
+ "${webserver_dir}"
+ exit 1
+fi
trap 'rm -rf --one-file-system "${tmp_dir}"' EXIT
printf '%s\n' "${hosts}" \