附一下我的脚本
#!/bin/sh
# PROVIDE: frpc_ssh
# REQUIRE: NETWORKING SERVERS
# KEYWORD: shutdown
. /etc/rc.subr
name="frpc_ssh"
rcvar="frpc_ssh_enable"
start_cmd="frpc_ssh_start"
stop_cmd="frpc_ssh_stop"
frpc_ssh_start() {
nohup /opt/frp/frpc -c /opt/frp/ssh.toml >/dev/null 2>&1 &
}
frpc_ssh_stop() {
pkill -f "frpc -c ssh.toml"
}
load_rc_config $name
run_rc_command "$1"
#!/bin/sh
# PROVIDE: frpc_ssh
# REQUIRE: NETWORKING SERVERS
# KEYWORD: shutdown
. /etc/rc.subr
name="frpc_ssh"
rcvar="frpc_ssh_enable"
start_cmd="frpc_ssh_start"
stop_cmd="frpc_ssh_stop"
frpc_ssh_start() {
nohup /opt/frp/frpc -c /opt/frp/ssh.toml >/dev/null 2>&1 &
}
frpc_ssh_stop() {
pkill -f "frpc -c ssh.toml"
}
load_rc_config $name
run_rc_command "$1"