%PDF- %PDF-
Direktori : /scripts2/attic/ |
Current File : //scripts2/attic/watch-nobody-process.sh |
#! /bin/bash for p in `ps auxf | grep nobody | awk '{ print $2 }'` do PROCESS=`/usr/sbin/lsof -p ${p}` # GrepNobody if echo ${PROCESS} | grep watch-nob > /dev/null ; then continue fi # ProFTP if echo ${PROCESS} | grep "/usr/sbin/proftpd" | grep '*:ftp (LISTEN)' | grep 'ftpd-rsa-key.pem' > /dev/null ; then continue fi # HTTPd if echo ${PROCESS} | grep '/usr/local/apache/logs/error_log' | grep '/dev/urandom' > /dev/null ; then continue fi # Entropychat if echo ${PROCESS} | grep '*:sunclustergeo (LISTEN)' > /dev/null ; then continue fi if [ "$PROCESS" == "" ]; then continue; fi kill -9 ${p} echo $PROCESS | mail -s "Nobody process runing in `hostname -s`" noc@sitioshispanos.com done