"Fossies" - the Fresh Open Source Software Archive

Member "unix/Darwin/dmg/files/pandorafms_uninstall/PandoraFMS agent uninstaller.app/Contents/Resources/uninstall" (15 Sep 2021, 1015 Bytes) of package /linux/misc/pandorafms_agent_unix-7.0NG.757.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/usr/bin/env bash
    2 
    3 # Stop the agent process
    4 `launchctl stop com.pandorafms.pandorafms`
    5 PFMSAGENT=`ps aux | grep pandora_agent | grep -v grep | wc -l`
    6 if [ "$PFMSAGENT" -gt "0" ]
    7 then
    8         PIDAGENT=`ps aux | grep pandora_agent | grep -v grep | awk '{print $2}'`
    9         kill $PIDAGENT
   10 fi
   11 
   12 # Remove local files
   13 rm -Rf /etc/pandora
   14 rm -Rf /usr/local/share/pandora_agent/
   15 rm -f /usr/local/bin/pandora_agent
   16 rm -f /usr/local/bin/pandora_agent_exec
   17 rm -f /usr/local/bin/pandora_revent
   18 rm -f /usr/local/bin/tentacle_client
   19 rm -f /usr/local/share/man/man1/pandora_agent.1.gz
   20 rm -f /usr/local/share/man/man1/tentacle_client.1.gz
   21 rm -f /var/log/pandora/pandora_agent.*
   22 rm -f /etc/newsyslog.d/pandora_agent.conf
   23 
   24 # Remove everything related with Pandora FMS agent
   25 `launchctl remove com.pandorafms.pandorafms`
   26 rm -f /Library/LaunchDaemons/com.pandorafms.pandorafms.plist
   27 
   28 # Remove all packages residual files
   29 rm -f /private/var/db/receipts/com.pandorafms*
   30 
   31 # Remove the uninstall app too
   32 rm -Rf /Applications/PandoraFMS*
   33