1 # .bash_profile - file executed when logging in
3 # identify via remote addr
4 case "${SSH_CLIENT%% *}" in
5 195.222.9.201) # glen ;)
8 193.0.96.*|2001:6a0:5001:*) # baggins
13 # identify via terminal last login (su, sudo)
14 if [ -z "$FTPADM" ]; then
16 LAST_LOGIN=$(last -if /var/run/utmp | awk -vtty="${LAST_TTY#/dev/}" '$2 == tty && $0 ~ /still logged in/ { print $1; exit; }')
17 export FTPADM=$LAST_LOGIN
18 unset LAST_TTY LAST_LOGIN
27 echo -ne "\033kth@ftp\033\\"
30 echo -ne "\033kac@ftp\033\\"
39 # let each ftp admin have own history file
40 if [ "$FTPADM" ]; then
41 export HISTFILE=$HOME/.history-$FTPADM
42 export CDHISTFILE=$HOME/.cd_history-$FTPADM
46 PATH=$PATH:~/pld-ftp-admin/bin