From 46f600ff237459e65e05e527ac90bc6b651a394a Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 2 Sep 2019 14:46:27 +0200 Subject: rotate-keys: do not use "exec su ..." it gets rid of our traps --- rotate-keys.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3-70-g09d2