1 # .bash_profile - file executed when logging in
3 # identify via remote addr
4 case "${SSH_CLIENT%% *}" in
5 84.50.110.50) # glen ;)
9 # identify via terminal last login (su, sudo)
10 if [ -z "$FTPADM" ]; then
12 LAST_LOGIN=$(last -if /var/run/utmpx | awk -vtty="${LAST_TTY#/dev/}" '$2 == tty && $0 ~ /still logged in/ { print $1; exit; }')
13 export FTPADM=$LAST_LOGIN
22 echo -ne "\033kth@ftp\033\\"
25 echo -ne "\033kac@ftp\033\\"
34 # let each ftp admin have own bash history
35 if [ "$FTPADM" ]; then
36 export HISTFILE=$HOME/.history-$FTPADM