Skip to content

Commit

Permalink
Added uninstallation routine for SERVERS back for extension installat…
Browse files Browse the repository at this point in the history
…ions previous to 1.2.0
  • Loading branch information
Kubik-Rubik committed Dec 6, 2017
1 parent 414673d commit f7edd3c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<name>New Relic - Application Performance Monitoring</name>
<description>A software analytics tool suite used by developers, ops, and software companies to understand how your applications are performing in development and production.</description>
<version>1.2.0</version>
<release>1</release>
<release>2</release>
<vendor>Plesk</vendor>
<url>http://www.plesk.com</url>
<os>unix</os>
Expand Down
29 changes: 29 additions & 0 deletions sbin/preuninstallcheck.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
#!/bin/bash -e

REMOVESERVERS=`cat /usr/local/psa/var/modules/new-relic/removepackageservers`

if [ "$REMOVESERVERS" = "1" ];
then
if [ -f /etc/init.d/newrelic-sysmond ];
then
if [ -f /etc/redhat-release ];
then
yum -y -q remove newrelic-sysmond
yum -y -q remove newrelic-repo

if [ -f /etc/yum.repos.d/newrelic.repo ]
then
rm /etc/yum.repos.d/newrelic.repo
fi
else
apt-get -qq -y --purge autoremove newrelic-sysmond

if [ -f /etc/apt/sources.list.d/newrelic.list ]
then
rm /etc/apt/sources.list.d/newrelic.list
fi
fi
fi
fi

# Add sleep of 6 seconds to avoid process lock issues
sleep 6

REMOVEAPM=`cat /usr/local/psa/var/modules/new-relic/removepackageapm`

if [ "$REMOVEAPM" = "1" ];
Expand Down

0 comments on commit f7edd3c

Please sign in to comment.