From bb789f7652f5e813449ebed7567a3c5a607d06fa Mon Sep 17 00:00:00 2001 From: Crazy <17147265+wwng2333@users.noreply.github.com> Date: Tue, 26 Dec 2023 10:26:11 +0800 Subject: [PATCH] add supervise daemon for alpine (#313) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit alpine在自动更新agent以后不会自动重启agent,导致批量掉线,添加守护进程以后问题解决 --- script/nezha-agent | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/script/nezha-agent b/script/nezha-agent index 79bc71a..3189b04 100755 --- a/script/nezha-agent +++ b/script/nezha-agent @@ -1,4 +1,7 @@ #!/sbin/openrc-run +supervisor=supervise-daemon +name=nezha-agent +supervise_daemon_args="--stdout /var/log/${name}.log --stderr /var/log/${name}.err" SERVER="nz_grpc_host:nz_grpc_port" #Dashboard 地址 ip:port SECRET="nz_client_secret" #SECRET NZ_BASE_PATH="/opt/nezha" @@ -56,4 +59,4 @@ start_pre() { if [ "${RC_CMD}" != "restart" ]; then checkconfig || return $? fi -} \ No newline at end of file +}