summaryrefslogtreecommitdiff
path: root/rotate-keys.in
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-09-09 09:01:04 +0200
committerErich Eckner <git@eckner.net>2019-09-09 09:01:04 +0200
commitad22aeadfa2ae1fd9112b9cc758860142a869521 (patch)
treed442c016ebdbaabcbc72a2d4687bdc2fc4e4a39c /rotate-keys.in
parent6b9f0cd428ded4dfa39b108ec2ca2f78d9f3d619 (diff)
downloadsimple-pki-ad22aeadfa2ae1fd9112b9cc758860142a869521.tar.xz
rotate-keys: only complain if EXIT trap is set
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