diff options
author | Erich Eckner <git@eckner.net> | 2019-09-02 14:46:27 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-09-02 14:46:27 +0200 |
commit | 46f600ff237459e65e05e527ac90bc6b651a394a (patch) | |
tree | d437db21d4b3c716503850d23fca888ed261bd5b | |
parent | 89a6d7c99d04b5d9fd6b08d4347d355a4773139d (diff) | |
download | simple-pki-46f600ff237459e65e05e527ac90bc6b651a394a.tar.xz |
rotate-keys: do not use "exec su ..." it gets rid of our traps
-rw-r--r-- | rotate-keys.in | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rotate-keys.in b/rotate-keys.in index 0fc6a44..ea50400 100644 --- a/rotate-keys.in +++ b/rotate-keys.in @@ -69,7 +69,8 @@ if [ "$(whoami)" != "${certificate_user}" ]; then fi chown -R "${certificate_user}" "${key_dir}" - exec su "${certificate_user}" -s /bin/bash -c "${me}" + su "${certificate_user}" -s /bin/bash -c "${me}" + exit $? fi >&2 printf 'only root can su %s\n' "${certificate_user}" exit 1 |