mirror of
https://github.com/henrygd/beszel.git
synced 2025-12-17 02:36:17 +01:00
OpenWRT - graceful service stop, restart and respawn if crashes (#1245)
This commit is contained in:
@@ -757,20 +757,12 @@ start_service() {
|
|||||||
procd_set_param user beszel
|
procd_set_param user beszel
|
||||||
procd_set_param pidfile /var/run/beszel-agent.pid
|
procd_set_param pidfile /var/run/beszel-agent.pid
|
||||||
procd_set_param env PORT="$PORT" KEY="$KEY" TOKEN="$TOKEN" HUB_URL="$HUB_URL"
|
procd_set_param env PORT="$PORT" KEY="$KEY" TOKEN="$TOKEN" HUB_URL="$HUB_URL"
|
||||||
|
procd_set_param respawn
|
||||||
procd_set_param stdout 1
|
procd_set_param stdout 1
|
||||||
procd_set_param stderr 1
|
procd_set_param stderr 1
|
||||||
procd_close_instance
|
procd_close_instance
|
||||||
}
|
}
|
||||||
|
|
||||||
stop_service() {
|
|
||||||
killall beszel-agent
|
|
||||||
}
|
|
||||||
|
|
||||||
restart_service() {
|
|
||||||
stop
|
|
||||||
start
|
|
||||||
}
|
|
||||||
|
|
||||||
# Extra command to trigger agent update
|
# Extra command to trigger agent update
|
||||||
EXTRA_COMMANDS="update restart"
|
EXTRA_COMMANDS="update restart"
|
||||||
EXTRA_HELP=" update Update the Beszel agent
|
EXTRA_HELP=" update Update the Beszel agent
|
||||||
|
|||||||
Reference in New Issue
Block a user