From 2a94e1d1ecc3c0d83c19fe4dd5446338925031d5 Mon Sep 17 00:00:00 2001 From: evrial Date: Mon, 6 Oct 2025 15:35:44 +0000 Subject: [PATCH] OpenWRT - graceful service stop, restart and respawn if crashes (#1245) --- supplemental/scripts/install-agent.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/supplemental/scripts/install-agent.sh b/supplemental/scripts/install-agent.sh index dfed471f..999143e2 100755 --- a/supplemental/scripts/install-agent.sh +++ b/supplemental/scripts/install-agent.sh @@ -757,20 +757,12 @@ start_service() { procd_set_param user beszel 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 respawn procd_set_param stdout 1 procd_set_param stderr 1 procd_close_instance } -stop_service() { - killall beszel-agent -} - -restart_service() { - stop - start -} - # Extra command to trigger agent update EXTRA_COMMANDS="update restart" EXTRA_HELP=" update Update the Beszel agent