Skip to content
Browse files

add a keyserver if none exists

  • Loading branch information...
1 parent 41fa086 commit 2b22109303abe5dba172f49aedb662dd698207ae @AlexanderWillner AlexanderWillner committed Feb 17, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 payload/gpg-postinstall.sh
View
5 payload/gpg-postinstall.sh
@@ -29,6 +29,11 @@ killall gpg-agent
if [ "" == "`grep 'comment GPGTools' $HOME/.gnupg/gpg.conf`" ]; then
echo "comment GPGTools - http://gpgtools.org" >> $HOME/.gnupg/gpg.conf;
fi
+# Add a keyserver if none exits
+ if [ "" == "`grep '^[ ]*keyserver ' $HOME/.gnupg/gpg.conf`" ]; then
+ echo "keyserver pool.sks-keyservers.net" >> $HOME/.gnupg/gpg.conf;
+ fi
+
# Remove any gpg-agent pinentry program options
[ -e "$HOME/.gnupg/gpg-agent.conf" ] && sed -i '' 's/^[ ]*\(pinentry-program\)/#\1/g' "$HOME/.gnupg/gpg-agent.conf"
[ -e "$HOME/.gnupg/gpg-agent.conf" ] && sed -i '' 's/^[ ]*\(no-use-standard-socket\)/#\1/g' "$HOME/.gnupg/gpg-agent.conf"

0 comments on commit 2b22109

Please sign in to comment.
Something went wrong with that request. Please try again.