blob: 72e61c7ab5711b4485ee1b024507999fc2dadfea [file] [log] [blame]
#!/bin/sh
while true
do
sleep 30
ps -ef|grep lynq-sdk-ready |grep -v "grep" > /dev/null
if [ $? -ne 0 ]; then
echo "lynq-sdk-ready no exist" > /dev/kmsg
sh /etc/init.d/lynq-sdk-ready.sh start
else
ps -A -ostat,pid,comm |grep lynq-sdk-ready| grep Z > /dev/null
if [ $? -eq 0 ]; then
echo "lynq-sdk-ready state is Z" > /dev/kmsg
pid=$(ps -A -ostat,pid,comm |grep lynq-sdk-ready|grep Z|awk '{print $2}')
kill -9 $pid
sh /etc/init.d/lynq-sdk-ready.sh start
fi
fi
ps -ef|grep lynq-atcid |grep -v "grep" > /dev/null
if [ $? -ne 0 ]; then
echo "lynq-atcid no exist" > /dev/kmsg
sh /etc/init.d/lynq-atcid.sh start
else
ps -A -ostat,pid,comm |grep lynq-atcid| grep Z > /dev/null
if [ $? -eq 0 ]; then
echo "lynq-atcid state is Z" > /dev/kmsg
pid=$(ps -A -ostat,pid,comm |grep lynq-atcid|grep Z|awk '{print $2}')
kill -9 $pid
sh /etc/init.d/lynq-atcid.sh start
fi
fi
ps -ef|grep lynq-ril-service |grep -v "grep" > /dev/null
if [ $? -ne 0 ]; then
echo "lynq-ril-service no exist" > /dev/kmsg
sh /etc/init.d/lynq-ril-service.sh start
else
ps -A -ostat,pid,comm |grep lynq-ril-service| grep Z > /dev/null
if [ $? -eq 0 ]; then
echo "lynq-ril-service state is Z" > /dev/kmsg
pid=$(ps -A -ostat,pid,comm |grep lynq-ril-service|grep Z|awk '{print $2}')
kill -9 $pid
sh /etc/init.d/lynq-ril-service.sh start
fi
fi
ps -ef|grep autosuspend |grep -v "grep" > /dev/null
if [ $? -ne 0 ]; then
echo "lynq-autosuspend no exist" > /dev/kmsg
sh /etc/init.d/lynq-autosuspend.sh start
else
ps -A -ostat,pid,comm |grep autosuspend| grep Z > /dev/null
if [ $? -eq 0 ]; then
echo "lynq-autosuspend state is Z" > /dev/kmsg
pid=$(ps -A -ostat,pid,comm |grep autosuspend|grep Z|awk '{print $2}')
kill -9 $pid
sh /etc/init.d/lynq-autosuspend.sh start
fi
fi
done