diff options
author | Erich Eckner <git@eckner.net> | 2019-09-09 09:01:04 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-09-09 09:01:04 +0200 |
commit | ad22aeadfa2ae1fd9112b9cc758860142a869521 (patch) | |
tree | d442c016ebdbaabcbc72a2d4687bdc2fc4e4a39c | |
parent | 6b9f0cd428ded4dfa39b108ec2ca2f78d9f3d619 (diff) | |
download | simple-pki-ad22aeadfa2ae1fd9112b9cc758860142a869521.tar.xz |
rotate-keys: only complain if EXIT trap is set
-rw-r--r-- | rotate-keys.in | 5 |
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 |