From 26dff3af8e3dcdd91d39899b33a4a6b1c9c072d4 Mon Sep 17 00:00:00 2001 From: Silvio Zimmer Date: Mon, 14 Apr 2025 10:00:43 +0200 Subject: [PATCH] fix update process by restoring update_agent function --- rmmagent-linux.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/rmmagent-linux.sh b/rmmagent-linux.sh index 3348fbf..8b7b39f 100644 --- a/rmmagent-linux.sh +++ b/rmmagent-linux.sh @@ -103,6 +103,15 @@ function agent_compile() { rm -R /tmp/rmmagent-master } +function update_agent() { + systemctl stop tacticalagent + + cp /tmp/temp_rmmagent /usr/local/bin/rmmagent + rm /tmp/temp_rmmagent + + systemctl start tacticalagent +} + function install_agent() { cp /tmp/temp_rmmagent /usr/local/bin/rmmagent /tmp/temp_rmmagent -m install -api $rmm_url -client-id $rmm_client_id -site-id $rmm_site_id -agent-type $rmm_agent_type -auth $rmm_auth @@ -163,7 +172,7 @@ install) update) go_install agent_compile - install_agent + update_agent echo "Tactical Agent Update is done" exit 0;; uninstall)