Files
birdlgp/service/bird-lgp-openwrt
2026-05-14 16:27:43 +08:00

29 lines
678 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/sh /etc/rc.common
# 启动优先级,通常在网络启动后
START=99
USE_PROCD=1
# 程序路径和配置文件路径(根据你的实际情况修改)
PROG="/etc/bird-lg/bird-lgproxy-go"
start_service() {
# 检查程序是否存在
[ -f "$PROG" ] || return 1
procd_open_instance "bird-lgproxy"
# 执行程序命令
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
procd_close_instance
}
stop_service() {
return 0
}