fix: use supervise-daemon for OpenRC to prevent blocking

This commit is contained in:
rowanchen-com
2026-03-17 01:57:55 +08:00
parent f2cf8f02bf
commit 735e738413

View File

@@ -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