保存为shell脚本
count=`ps -ef | grep "frpc" | grep -v grep | wc -l`
echo $count
if [ $count -eq 0 ];then
nohup /cagy/frpc -c frpc.ini >/dev/null 2>&1 & <-----启动命令
fi
chmod u+x xxx.sh
然后配置定时
crontab -e
1 * * * * /root/fr.sh
每小时1分钟执行一次