2019年12月18日星期三

frp/nps在openwrt下的自启动

在openwrt下使用脚本自启,还不是一般繁琐。直接rc local放入sh 脚本自启不顺利。

然后绕个大圈子,下面记录下:

# 进入init.d目录
cd /etc/init.d

#创建一个你的脚本,例如frp,不用sh后缀

#编辑frp:

#!bin/sh /etc/rc.common
#设置启动顺序
START=95

start(){
sh /root/frp.sh
}

#保存退出
#给权限
chmod 0755 /etc/init.d/frp

# 进入rc.d目录
cd /etc/rc.d

# 建立启动软连接
ln -s /etc/init.d/frp /etc/rc.d/S95frp 


--------------------------------------------
#除了启动脚本,还可以直接打代码,&代表后台工作
./frpc -c frpc.ini &
./frpc -c /etc/storage/frpc/frpc.ini >/dev/null 2>&1 &



感谢
https://blog.csdn.net/weixin_38890593/article/details/87861003

没有评论:

发表评论

openwrt在线编译 插件名字查找

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