定时监视XXX进程,若没有了,重新启动,“>/dev/null 是讲log输出到空设备,不想看”
#!/bin/sh
while true
do
if pidof /etc/init.d/ppp_start start >/dev/null; then
echo "check 3G modem"
else
echo "start 3G modem"
/etc/init.d/ppp_start start &
fi
sleep 10
done