blob: 72e61c7ab5711b4485ee1b024507999fc2dadfea [file] [log] [blame]
xf.li48994ac2024-12-02 00:13:05 -08001#!/bin/sh
2while true
3do
4 sleep 30
5 ps -ef|grep lynq-sdk-ready |grep -v "grep" > /dev/null
6 if [ $? -ne 0 ]; then
7 echo "lynq-sdk-ready no exist" > /dev/kmsg
8 sh /etc/init.d/lynq-sdk-ready.sh start
9 else
10 ps -A -ostat,pid,comm |grep lynq-sdk-ready| grep Z > /dev/null
11 if [ $? -eq 0 ]; then
12 echo "lynq-sdk-ready state is Z" > /dev/kmsg
13 pid=$(ps -A -ostat,pid,comm |grep lynq-sdk-ready|grep Z|awk '{print $2}')
14 kill -9 $pid
15 sh /etc/init.d/lynq-sdk-ready.sh start
16 fi
17 fi
18
19 ps -ef|grep lynq-atcid |grep -v "grep" > /dev/null
20 if [ $? -ne 0 ]; then
21 echo "lynq-atcid no exist" > /dev/kmsg
22 sh /etc/init.d/lynq-atcid.sh start
23 else
24 ps -A -ostat,pid,comm |grep lynq-atcid| grep Z > /dev/null
25 if [ $? -eq 0 ]; then
26 echo "lynq-atcid state is Z" > /dev/kmsg
27 pid=$(ps -A -ostat,pid,comm |grep lynq-atcid|grep Z|awk '{print $2}')
28 kill -9 $pid
29 sh /etc/init.d/lynq-atcid.sh start
30 fi
31 fi
32
33 ps -ef|grep lynq-ril-service |grep -v "grep" > /dev/null
34 if [ $? -ne 0 ]; then
35 echo "lynq-ril-service no exist" > /dev/kmsg
36 sh /etc/init.d/lynq-ril-service.sh start
37 else
38 ps -A -ostat,pid,comm |grep lynq-ril-service| grep Z > /dev/null
39 if [ $? -eq 0 ]; then
40 echo "lynq-ril-service state is Z" > /dev/kmsg
41 pid=$(ps -A -ostat,pid,comm |grep lynq-ril-service|grep Z|awk '{print $2}')
42 kill -9 $pid
43 sh /etc/init.d/lynq-ril-service.sh start
44 fi
45 fi
46
47 ps -ef|grep autosuspend |grep -v "grep" > /dev/null
48 if [ $? -ne 0 ]; then
49 echo "lynq-autosuspend no exist" > /dev/kmsg
50 sh /etc/init.d/lynq-autosuspend.sh start
51 else
52 ps -A -ostat,pid,comm |grep autosuspend| grep Z > /dev/null
53 if [ $? -eq 0 ]; then
54 echo "lynq-autosuspend state is Z" > /dev/kmsg
55 pid=$(ps -A -ostat,pid,comm |grep autosuspend|grep Z|awk '{print $2}')
56 kill -9 $pid
57 sh /etc/init.d/lynq-autosuspend.sh start
58 fi
59 fi
60done