From dc7bae04c7fa4ccd66b4ef15355d5dcabf3fbeac Mon Sep 17 00:00:00 2001 From: David Date: Sat, 3 Jul 2021 01:08:40 +0100 Subject: [PATCH] Fix pgp.sh complaining about grep --- setup/pgp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/pgp.sh b/setup/pgp.sh index 3f00909..20439e7 100755 --- a/setup/pgp.sh +++ b/setup/pgp.sh @@ -31,7 +31,7 @@ EOF # - There isn't a fingerprint on /etc/mailinabox.conf # - The configured fingerprint doesn't actually exist -if [ "${PGPKEY-}" == "" -o "$(gpg --list-secret-keys 2> /dev/null | grep ${PGPKEY-})" = "" ]; then +if [ -z "${PGPKEY:-}" -o "$(gpg --list-secret-keys 2> /dev/null | grep ${PGPKEY:-\r\n})" = "" ]; then echo "No keypair found. Generating daemon's PGP keypair..." gpg_keygen if [ $? -ne 0 ]; then