Created
May 13, 2017 09:11
-
-
Save cuiwm/7b965c3a782b09e1cc4e545a130eadf2 to your computer and use it in GitHub Desktop.
watchdog.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
while [ true ] ; do | |
CNT=`ps -ef|grep "gclient.py sync" |grep -v grep |wc -l` | |
echo "gclient:" $CNT | |
if [[ $CNT -lt 1 ]] ; then | |
echo "gclient exit" | |
ifconfig eth0 192.168.172.106 netmask 255.255.255.0 | |
route add default gw 192.168.172.2 | |
cd /data/cui/git_repo/webrtc_fetch | |
gclient sync | |
fi | |
sleep 2 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment