Created
August 10, 2017 05:22
-
-
Save i-sync/3b30ce7d7ac9a3f809a2e9ad772ae1a0 to your computer and use it in GitHub Desktop.
frpc auto start script
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 | |
LOGTIME=$(date "+%F %T") | |
PRO_NAME=frpc | |
NUM=$(ps | grep $PRO_NAME | grep -v grep |wc -l) | |
#echo $NUM >> /tmp/frp.log | |
if [ "${NUM}" -lt "1" ];then | |
echo $LOGTIME $PRO_NAME is stop, restarting.... >> /tmp/frp.log | |
/home/pi/frp/frpc -c /home/pi/frp/frpc.ini -L /home/pi/frp/frpc.log & | |
else | |
echo $LOGTIME $PRO_NAME is running! >> /tmp/frp.log | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment