Commit e0894cb0 authored by 黄振令's avatar 黄振令

【修改内容】检查网关程序,如果死掉重启

parent 253f2881
...@@ -20,4 +20,13 @@ else ...@@ -20,4 +20,13 @@ else
/home/kk/kk_midware >/dev/null 2>&1 & /home/kk/kk_midware >/dev/null 2>&1 &
/home/kk/kcloud >/dev/null 2>&1 & /home/kk/kcloud >/dev/null 2>&1 &
fi fi
sleep 30
PIDS=`ps|grep Z3GatewayHost |grep -v grep | awk '{print $1}'`
if [ "$PIDS" != "" ]; then
echo "Z3GatewayHost is runing!"
else
echo "Z3GatewayHost is not running ,now restart Z3GatewayHost"
pgrep Z3GatewayHost | xargs kill -s 9
/home/kk/Z3GatewayHost -f x -p /dev/ttyS0 >/dev/null 2>&1 &
fi
done done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment