mirror of
https://github.com/fankes/beszel.git
synced 2025-10-19 01:39:34 +08:00
Adding openwrt restart procedure after updating the agent automatically (#1151)
This commit is contained in:
@@ -705,13 +705,19 @@ stop_service() {
|
|||||||
killall beszel-agent
|
killall beszel-agent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
restart_service() {
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
}
|
||||||
|
|
||||||
# Extra command to trigger agent update
|
# Extra command to trigger agent update
|
||||||
EXTRA_COMMANDS="update"
|
EXTRA_COMMANDS="update restart"
|
||||||
EXTRA_HELP=" update Update the Beszel agent"
|
EXTRA_HELP=" update Update the Beszel agent
|
||||||
|
restart Restart the Beszel agent"
|
||||||
|
|
||||||
update() {
|
update() {
|
||||||
if /opt/beszel-agent/beszel-agent update | grep -q "Successfully updated"; then
|
if /opt/beszel-agent/beszel-agent update | grep -q "Successfully updated"; then
|
||||||
start_service
|
/etc/init.d/beszel-agent restart
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user