使用ps做进程查询 #!/bin/sh while true do procnum=`ps -ef|grep “testApp”|grep -v grep|wc -l` if [ $procnum -eq 0 ]; then /root/testApp & fi sleep 5 done
Warning: Illegal string offset 'index' in /www/wwwroot/justchen.com/wp-content/themes/9IPHP-master/index.php on line 97