]> arthur.barton.de Git - ConfigScripts.git/blob - user/bash_logout
Don't set $USER and $UID
[ConfigScripts.git] / user / bash_logout
1 #
2 # ~/.bash_logout: executed by bash(1) on logout
3 # Written 2003-2014 by Alexander Barton (alex@barton.de)
4 #
5 # This script is executed by bash(1) on logout.
6 #
7 # PLEASE NOTE:
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!
11 #
12
13 [ -e ~/.ConfigScripts.debug ] && echo " >> ~/.bash_logout ..."
14
15 [ -r ~/.bash_logout.user ] && source ~/.bash_logout.user
16
17 # Clean up SSH agents, if running
18 [ $SSH_AGENT_PID ] && eval `ssh-agent -k`
19
20 # Clear console, it it is local terminal
21 case `tty` in
22     /dev/tty[0-9]*|/dev/ttyS[0-9]*)
23         [ -x /usr/bin/clear_console ] && /usr/bin/clear_console --quiet || clear
24         ;;
25     *)
26         if [ -z "$SUDO_USER" ]; then
27                 echo "Bye, bye, $LOGNAME!"; echo
28         fi
29 esac
30
31 # -eof-