MaxScale/etc/postrm.in
Markus Mäkelä ba3912ddb4 MXS-1326: Fix postrm script
The script could only work on RPM based systems as DEB based uninstall
scripts are called with different parameters, namely "remove" instead of
"0".
2017-07-25 11:25:43 +03:00

26 lines
634 B
Bash
Executable File

#!/bin/sh
# The first argument is the number of packages left after
# this one has been removed. If it is 0 then the package is being
# removed from the system.
if [ "$1" = "0" ] || [ "$1" = "remove" ]
then
if [ -f /etc/init.d/maxscale ]
then
rm /etc/init.d/maxscale
fi
if [ -f /etc/ld.so.conf.d/maxscale.conf ]
then
rm /etc/ld.so.conf.d/maxscale.conf
fi
if [ -f /usr/lib/systemd/system/maxscale.service ]
then
rm /usr/lib/systemd/system/maxscale.service
elif [ -f /lib/systemd/system/maxscale.service ]
then
rm /lib/systemd/system/maxscale.service
fi
fi