#!/bin/sh
ps -ef |grep ./FileServer > /dev/null 2>1 #检测进程写入/dev/null
if [ $? -eq 0 ] #0为正常
then
echo logprocess run ok!
else
nohup /home/oracle/XXXX
echo start ok !
fi
#!/bin/sh
count=`ps -fe |grep "a.out" | grep -v "grep" | wc -l`
if [ $count -lt 1 ]; then
/root/sh/restart.sh