diff options
author | Jameson Graef Rollins <jrollins@phys.columbia.edu> | 2008-08-15 10:46:40 -0700 |
---|---|---|
committer | Jameson Graef Rollins <jrollins@phys.columbia.edu> | 2008-08-15 10:46:40 -0700 |
commit | ab5cfab5be64cfb5e01c2b660587da43b3097cad (patch) | |
tree | 838d0e46938367198bd7af26333177f91ff02b01 /src | |
parent | cb45bed4fce593770b4378fbb13e68cf3b68137a (diff) |
Added checking of gpg.conf for keyserver.
Diffstat (limited to 'src')
-rwxr-xr-x | src/monkeysphere | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/monkeysphere b/src/monkeysphere index 8ddfe7f..6d9e6c3 100755 --- a/src/monkeysphere +++ b/src/monkeysphere @@ -191,7 +191,16 @@ mkdir -p -m 0700 "$MONKEYSPHERE_HOME" # set empty config variables with ones from the environment, or from # config file, or with defaults GNUPGHOME=${MONKEYSPHERE_GNUPGHOME:=${GNUPGHOME:="${HOME}/.gnupg"}} -KEYSERVER=${MONKEYSPHERE_KEYSERVER:=${KEYSERVER:="subkeys.pgp.net"}} +KEYSERVER=${MONKEYSPHERE_KEYSERVER:="$KEYSERVER"} +# if keyserver not specified in env or monkeysphere.conf, +# look in gpg.conf +if [ -z "$KEYSERVER" ] ; then + if [ -f "${GNUPGHOME}/gpg.conf" ] ; then + KEYSERVER=$(grep -e "^[[:space:]]*keyserver " "${GNUPGHOME}/gpg.conf" | tail -1 | awk '{ print $2 }') + fi +fi +# if it's still not specified, use the default +KEYSERVER=${KEYSERVER:="subkeys.pgp.net"} CHECK_KEYSERVER=${MONKEYSPHERE_CHECK_KEYSERVER:=${CHECK_KEYSERVER:="true"}} KNOWN_HOSTS=${MONKEYSPHERE_KNOWN_HOSTS:=${KNOWN_HOSTS:="${HOME}/.ssh/known_hosts"}} HASH_KNOWN_HOSTS=${MONKEYSPHERE_HASH_KNOWN_HOSTS:=${HASH_KNOWN_HOSTS:="true"}} |