diff --git a/install-agent.sh b/install-agent.sh index 081d318..334a1a2 100755 --- a/install-agent.sh +++ b/install-agent.sh @@ -262,7 +262,13 @@ name="x-ui-agent" description="3x-ui lightweight node agent" command="/usr/local/x-ui/xui-agent" command_args="agent" -command_background="yes" +# supervise-daemon 守护(第 23 条):进程崩溃后按 respawn 参数自动拉起, +# 对齐 systemd 支的 Restart=on-failure + RestartSec=5;旧版 command_background +# 只负责后台化、崩溃不重启。respawn_max=0 = 不限次(同 systemd 的持续重试)。 +supervisor="supervise-daemon" +respawn_delay=5 +respawn_max=0 +respawn_period=0 pidfile="/run/x-ui-agent.pid" output_log="/var/log/x-ui-agent.log" error_log="/var/log/x-ui-agent.log"