Created
June 6, 2019 10:24
-
-
Save wgm89/0c7c811f89ab68487195677387c2d652 to your computer and use it in GitHub Desktop.
监控脚本
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 : | |
do | |
echo "Current DIR is " $PWD | |
stillRunning=$(ps -ef |grep "/data/wwwroot/lottery_v2/CORE/think auto" |grep -v "grep") | |
if [ "$stillRunning" ] ; then | |
echo "running..." | |
else | |
echo "restart ..." | |
/usr/local/php/bin/php /data/wwwroot/lottery_v2/CORE/think auto | |
echo "TWS service was exited!" | |
fi | |
sleep 10 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment