cd $(dirname $0) source ~/.bash_profile SYSTEM_TIME=`date '+%Y-%m-%d %T'` count=`ps -ef |grep "python /data/web/main.py" | grep -v grep | wc -l` if [ $count -eq 0 ];then echo $SYSTEM_TIME >> /data/web/check.log /usr/local/bin/spawn-fcgi -d /data/web/ -f /data/web/main.py -a 127.0.0.1 -p 9008 -P /data/web/report.pid fi