#!/bin/sh
# Deamon Check Program in U51
# including :
# 1.alarm(above & Motorola & EMX2500 & Alcatel; 2.connect_EMX)
#
while [ 1 ]
do
#for i in $ABOVE_DAEMON
cat $1|while read pathname appname
do
ps -ef |grep -v "grep "|grep
"$appname " |awk '{print "echo ",$8,$9} '> check_file
if test -s check_file
then
echo $appname "\t\tis running "
else
cd $pathname
$appname &
if [ $? -ne 0 ]
then
echo "Run '$appname ' failed! "
break
else
echo "start '$appname ' successed! "
fi
fi
done
echo "-----------------------------------------------------------------\n "
echo "-----------------------------------------------------------------\n\n "
sleep 60
done # done of while
阅读(1429) | 评论(0) | 转发(0) |