Created
September 24, 2015 11:56
-
-
Save DeviaVir/4725aced1461d5d80f70 to your computer and use it in GitHub Desktop.
Intermittent problems with gpg and a NEO key? And you need it to work NOW? Use this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "kill gpg-agent" | |
code=0 | |
while [ 1 -ne $code ]; do | |
killall gpg-agent | |
code=$? | |
sleep 1 | |
done | |
echo "kill ssh" | |
killall ssh | |
echo "kill ssh muxers" | |
for pid in `ps -ef | grep ssh | grep -v grep | awk '{print $2}'`; do | |
kill $pid | |
done | |
echo "restart gpg-agent" | |
eval $(gpg-agent --daemon) | |
echo | |
echo "All done. Now unplug / replug the NEO token." | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment