dbarison
10/27/2017 - 9:52 AM

profile

profile


process=`ps | awk 'NR==2 { print $4 }'`
if [ "${process}" != "PassengerAgent" ] && [ "${process}" != "ruby" ] && [ "$USER" != "davide" ]; then
  echo "$USER login at $HOSTNAME on `date` `ps`" | mail -s "SSH login" info@megiston.it
fi

if [ "${process}" != "PassengerAgent" ] && [ "${process}" != "ruby" ] && [ "$USER" == "git" ]; then
  cowsay "Sorry, but shell access for 'git' user is disable. Bye!"
  #pkill -KILL -u git
  exit
fi