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, 3 insertions, 2 deletions
diff --git a/rotate-keys.in b/rotate-keys.in
index 8c51e62..970d533 100644
--- a/rotate-keys.in
+++ b/rotate-keys.in
@@ -76,8 +76,9 @@ if [ "$(whoami)" != "${certificate_user}" ]; then
exit 1
fi
-if [ -n "$(trap)" ]; then
- >&2 echo 'outer traps set - those will be forgotten!'
+if trap \
+| grep -q ' EXIT$'; then
+ >&2 echo 'outer EXIT trap set - this will be forgotten!'
exit 1
fi