mirror of
https://github.com/233boy/sing-box.git
synced 2026-05-03 06:14:41 +08:00
fix: use supervise-daemon for OpenRC to prevent blocking
This commit is contained in:
@@ -77,6 +77,7 @@ install_service_openrc() {
|
|||||||
|
|
||||||
name="$is_core_name"
|
name="$is_core_name"
|
||||||
description="$is_core_name Service"
|
description="$is_core_name Service"
|
||||||
|
|
||||||
command="$is_core_bin"
|
command="$is_core_bin"
|
||||||
command_args="run -c $is_config_json -C $is_conf_dir"
|
command_args="run -c $is_config_json -C $is_conf_dir"
|
||||||
command_background=true
|
command_background=true
|
||||||
@@ -84,6 +85,8 @@ pidfile="/run/\${RC_SVCNAME}.pid"
|
|||||||
output_log="/var/log/$is_core/access.log"
|
output_log="/var/log/$is_core/access.log"
|
||||||
error_log="/var/log/$is_core/error.log"
|
error_log="/var/log/$is_core/error.log"
|
||||||
|
|
||||||
|
supervisor=supervise-daemon
|
||||||
|
|
||||||
depend() {
|
depend() {
|
||||||
need net
|
need net
|
||||||
after firewall
|
after firewall
|
||||||
@@ -97,11 +100,14 @@ EOF
|
|||||||
|
|
||||||
name="Caddy"
|
name="Caddy"
|
||||||
description="Caddy web server"
|
description="Caddy web server"
|
||||||
|
|
||||||
command="$is_caddy_bin"
|
command="$is_caddy_bin"
|
||||||
command_args="run --environ --config $is_caddyfile --adapter caddyfile"
|
command_args="run --environ --config $is_caddyfile --adapter caddyfile"
|
||||||
command_background=true
|
command_background=true
|
||||||
pidfile="/run/\${RC_SVCNAME}.pid"
|
pidfile="/run/\${RC_SVCNAME}.pid"
|
||||||
|
|
||||||
|
supervisor=supervise-daemon
|
||||||
|
|
||||||
depend() {
|
depend() {
|
||||||
need net
|
need net
|
||||||
after firewall
|
after firewall
|
||||||
|
|||||||
Reference in New Issue
Block a user