From 1c059f5afc8844b8c62e036d84ea33bd2e6f7be1 Mon Sep 17 00:00:00 2001 From: fermin831 Date: Tue, 18 Jul 2017 17:28:26 +0200 Subject: [PATCH] Stop agent on uninstall tarball --- pandora_agents/unix/pandora_agent_installer | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 7967cc9d11..723623da19 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -150,6 +150,13 @@ uninstall () { rm /Library/LaunchDaemons/com.pandorafms.pandorafms.plist 2> /dev/null fi + # Stops the agent on uninstall + if [ -f $PANDORA_BASE/etc/init.d/pandora_agent_daemon ]; then + $PANDORA_BASE/etc/init.d/pandora_agent_daemon stop 12> /dev/null + else + echo "$PANDORA_BASE/etc/init.d/pandora_agent_daemon not found to stop agent" + fi + echo "Removing Pandora FMS Agent..." rm -Rf $PANDORA_BASE$PANDORA_BIN 2> /dev/null rm -Rf $PANDORA_BASE$PANDORA_EXEC_BIN 2> /dev/null