2020年11月4日星期三

linux守护进程 脚本

 脚本三:

这个脚本是博士在网友“小Q主人”那里获得的,这个linux脚本是windows进程守护脚本设计思路编写的。

将下面的代码保存为frps.sh放入frp程序目录

Bash
cd /root/frp/
start='./frps -c ./frps.ini'

while :
do
echo [`date`]restart\"$start\" > /root/restartfrps.log
$start
done


cd /root/frp/为你的文件路径

使用方法

Bash

sh ./frps.sh

kill了frpc进程后 脚本起作用了马上又恢复了frpc进程,效果还是可以的。



来源http://diannaobos.com/post/769.html

没有评论:

发表评论

openwrt在线编译 插件名字查找

openwrt在线编译 https://firmware-selector.staging.immortalwrt.org/ 插件名字查找 https://downloads.staging.immortalwrt.org/releases/23.05.1/packages/x8...