]> arthur.barton.de Git - ConfigScripts.git/blobdiff - user/bash_logout
Add support for keychain(1) ssh-agent and gpg-agent helper
[ConfigScripts.git] / user / bash_logout
index b2e4f093297329ef44bafa78ffe2761572cd2ae5..3b258553e95e4e63b6047906d12f15e9c43c2b81 100644 (file)
 
 [ -r ~/.bash_logout.user ] && source ~/.bash_logout.user
 
-# Clean up SSH agents, if running
-[ $SSH_AGENT_PID ] && eval `ssh-agent -k`
+# Clean up SSH agents, if running and not using keychain(1)
+if [ $SSH_AGENT_PID ]; then
+       type keychain >/dev/null 2>&1 || eval `ssh-agent -k`
+fi
 
 # Clear the console if it is a local terminal
 case `tty` in