2 # ~/.bash_logout: executed by bash(1) on logout
3 # Written 2003-2014 by Alexander Barton (alex@barton.de)
5 # This script is executed by bash(1) on logout.
8 # To make this script generic, it sources ~/bash_logout.user if it exists.
9 # So you shouldn't make changes to this script, but create your own
10 # individual ~/bash_logout.user file!
13 [ -e ~/.ConfigScripts.debug ] && echo " .. ~/.bash_logout ..."
15 [ -r ~/.bash_logout.user ] && source ~/.bash_logout.user
17 [ -e ~/.ConfigScripts.debug ] && echo " >> ~/.bash_logout ..."
19 # Clean up SSH agents, if running and not using keychain(1)
20 if [ $SSH_AGENT_PID ]; then
21 type -t keychain >/dev/null || eval `ssh-agent -k`
24 # Clear the console if it is a local terminal
26 /dev/tty[0-9]*|/dev/ttyS[0-9]*)
27 [ -x /usr/bin/clear_console ] && /usr/bin/clear_console --quiet || clear
30 if [ -z "$SUDO_USER" ]; then
31 echo "Bye, bye, $LOGNAME!"; echo