add supervise daemon for alpine (#313)

alpine在自动更新agent以后不会自动重启agent,导致批量掉线,添加守护进程以后问题解决
This commit is contained in:
Crazy 2023-12-26 10:26:11 +08:00 committed by GitHub
parent 51c1e41123
commit bb789f7652
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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