Merge branch 'ent-1050-el-instalador-de-tarball-del-agente-no-lo-para-despues-de-desinstalar' into 'develop'

Stop agent on uninstall tarball

See merge request !673
This commit is contained in:
vgilc 2017-07-18 18:34:57 +02:00
commit d36fef16c0
1 changed files with 7 additions and 0 deletions

View File

@ -150,6 +150,13 @@ uninstall () {
rm /Library/LaunchDaemons/com.pandorafms.pandorafms.plist 2> /dev/null rm /Library/LaunchDaemons/com.pandorafms.pandorafms.plist 2> /dev/null
fi 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..." echo "Removing Pandora FMS Agent..."
rm -Rf $PANDORA_BASE$PANDORA_BIN 2> /dev/null rm -Rf $PANDORA_BASE$PANDORA_BIN 2> /dev/null
rm -Rf $PANDORA_BASE$PANDORA_EXEC_BIN 2> /dev/null rm -Rf $PANDORA_BASE$PANDORA_EXEC_BIN 2> /dev/null