Updated gpgconf check to handle gpg versions where gpgconf doesn't exist

This commit is contained in:
Hubert Farnsworth 2019-04-22 18:29:35 +00:00
parent 68d84d6f06
commit c1acefed25

View File

@ -34,8 +34,13 @@ curl -o /usr/local/bin/gosu.asc -# -SL $url_key
gpg --verify /usr/local/bin/gosu.asc
# cleanup -- need to kill agent so that there is no race condition for
# agent files in $GNUPGHOME
gpgconf --kill gpg-agent
# agent files in $GNUPGHOME. Only need to do this on newer distros
# with gpgconf installed
GPGCONF_BIN="$(command -v gpgconf)" || true
if [ -n "$GPGCONF" ] && [ -x $GPGCONF_BIN ]; then
gpgconf --kill gpg-agent
fi
rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc
chmod +x /usr/local/bin/gosu