diff options
author | Holger Levsen <holger@layer-acht.org> | 2016-12-22 21:46:21 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2016-12-22 21:46:21 +0100 |
commit | 00daf62acbaacf60ba330b2f5d0bad9983c134fa (patch) | |
tree | 07f6f909f55019b193a830bdaec67c12a81c637b | |
parent | eea2e1db418c3609482da1e78b93335d7ce3626d (diff) | |
download | jenkins.debian.net-00daf62acbaacf60ba330b2f5d0bad9983c134fa.tar.xz |
reproducible Debian: use sudo -H
Signed-off-by: Holger Levsen <holger@layer-acht.org>
-rwxr-xr-x | update_jdn.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/update_jdn.sh b/update_jdn.sh index 6b48fa38..a39cdb71 100755 --- a/update_jdn.sh +++ b/update_jdn.sh @@ -687,12 +687,12 @@ fi # # Create GPG key for jenkins user if they do not already exist (eg. to sign .buildinfo files) # -if sudo -u jenkins gpg --with-colons --fixed-list-mode --list-secret-keys | cut -d: -f1 | grep -qsFx 'sec' >/dev/null 2>&1 ; then +if sudo -H -u jenkins gpg --with-colons --fixed-list-mode --list-secret-keys | cut -d: -f1 | grep -qsFx 'sec' >/dev/null 2>&1 ; then explain "$(date) - Not generating GPG key as one already exists for jenkins user." else explain "$(date) - Generating GPG key for jenkins user." - sudo -u jenkins gpg --no-tty --batch --gen-key <<EOF + sudo -H -u jenkins gpg --no-tty --batch --gen-key <<EOF Key-Type: RSA Key-Length: 4096 Key-Usage: sign @@ -704,7 +704,7 @@ Expire-Date: 0 %commit EOF - GPG_KEY_ID="$(sudo -u jenkins gpg --with-colons --fixed-list-mode --list-secret-keys | grep '^sec' | cut -d: -f5 | tail -n1)" + GPG_KEY_ID="$(sudo -H -u jenkins gpg --with-colons --fixed-list-mode --list-secret-keys | grep '^sec' | cut -d: -f5 | tail -n1)" if [ "$GPG_KEY_ID" = "" ] then |