0
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
bird_socket: "/var/run/bird.ctl"
|
||||
bird_restrict_cmds: true
|
||||
listen: "0.0.0.0:8000"
|
||||
traceroute_bin: "/etc/bird-lg/nexttrace"
|
||||
traceroute_flags: "-C -n -M -q 1"
|
||||
traceroute_bin: "/etc/bird-lg/trace"
|
||||
traceroute_flags: ""
|
||||
traceroute_raw: true
|
||||
traceroute_max_concurrent: 5
|
||||
@@ -5,8 +5,7 @@ START=99
|
||||
USE_PROCD=1
|
||||
|
||||
# 程序路径和配置文件路径(根据你的实际情况修改)
|
||||
PROG="/etc/birdlg/bird-lgproxy-go"
|
||||
CONF="/etc/birdlg/config.yml"
|
||||
PROG="/etc/bird-lg/bird-lgproxy-go"
|
||||
|
||||
start_service() {
|
||||
# 检查程序是否存在
|
||||
@@ -14,14 +13,11 @@ start_service() {
|
||||
|
||||
procd_open_instance "bird-lgproxy"
|
||||
|
||||
# 执行程序命令,-c 指定配置文件(请根据 bird-lg-go 的实际参数调整)
|
||||
# 如果 bird-lgproxy-go 默认在当前目录找 config.yml,可以用 procd_set_param chdir
|
||||
procd_set_param command "$PROG" -config "$CONF"
|
||||
# 执行程序命令
|
||||
procd_set_param command "$PROG"
|
||||
|
||||
# 自动重启设置:如果程序崩溃,5秒后重启
|
||||
procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}
|
||||
|
||||
# 错误日志和标准输出重定向到系统日志
|
||||
procd_set_param stderr 1
|
||||
procd_set_param stdout 1
|
||||
|
||||
@@ -29,6 +25,5 @@ start_service() {
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
# 停止时的操作,procd 会自动处理信号
|
||||
return 0
|
||||
}
|
||||
Reference in New Issue
Block a user