Adding openwrt restart procedure after updating the agent automatically (#1151)

This commit is contained in:
Sasha Blue
2025-09-07 19:25:23 +02:00
committed by GitHub
parent eb4bdafbea
commit a1eb15dabb

View File

@@ -705,13 +705,19 @@ stop_service() {
killall beszel-agent
}
restart_service() {
stop
start
}
# Extra command to trigger agent update
EXTRA_COMMANDS="update"
EXTRA_HELP=" update Update the Beszel agent"
EXTRA_COMMANDS="update restart"
EXTRA_HELP=" update Update the Beszel agent
restart Restart the Beszel agent"
update() {
if /opt/beszel-agent/beszel-agent update | grep -q "Successfully updated"; then
start_service
/etc/init.d/beszel-agent restart
fi
}