Created
April 26, 2020 13:33
-
-
Save void285/8e4bff158aed431d6e50cc32c3d06cca to your computer and use it in GitHub Desktop.
restart process if down on openwrt
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
cnt=`ps | grep "kcptun" | grep -v "grep" | wc -l` | |
if [ $cnt -eq 0 ];then | |
/usr/bin/kcptun-client -c /var/etc/kcptun/client.general.json | |
echo "restart kcptun service at `date`" >> /root/check.log | |
else | |
echo "$cnt kcptun service on at `date`" | |
fi | |
# add this line to cron with `crontab -e` | |
# * * * * * /root/openwrt_process_watchdog.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment