[root@test ~]# more login.sh
#!/bin/sh
#this is login scripts
ps=`ps aux | grep tty2`
kill=`ps aux | grep tty2 | awk '{print $2}'`
case $ps
in
*bash* )
echo "tty2 login";
kill -9 $kill;
echo "kill login user";;
* )
echo "tty2 no login";;
esac
阅读(244) | 评论(0) | 转发(0) |