Files
ConfigServerBackups/MailScanner/msuninstall.sh

51 lines
1.3 KiB
Bash
Raw Normal View History

2025-07-28 11:09:53 +01:00
#!/bin/sh
###############################################################################
# Copyright 2004-2020, Way to the Web Limited
# URL: http://www.configserver.com
# Email: sales@waytotheweb.com
###############################################################################
PATH=$PATH:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
2025-07-28 11:28:59 +01:00
if [ ! -e "msuninstall.pl" ]; then
echo "Download msuninstall.pl here first"
2025-07-28 11:09:53 +01:00
exit
fi
if [ -e "/usr/local/cpanel/version" ]; then
sed -i 's%/usr/bin/perl%/usr/local/cpanel/3rdparty/bin/perl%' msuninstall.pl
else
sed -i 's%/usr/local/cpanel/3rdparty/bin/perl%/usr/bin/perl%' msuninstall.pl
fi
if [ -e "/usr/msfe/uninstall.msfe.sh" ]; then
sh /usr/msfe/uninstall.msfe.sh
fi
rm -Rfv /usr/msfe
rm -f /etc/cron.daily/mailscanner_daily.cron
if test `cat /proc/1/comm` = "systemd"
then
systemctl disable MailScanner.service
systemctl stop MailScanner.service
rm -f /usr/lib/systemd/system/MailScanner.service
systemctl daemon-reload
else
service MailScanner stop
chkconfig MailScanner off
chkconfig MailScanner --del
rm -f /etc/init.d/MailScanner
fi
if [ -e "/usr/local/cpanel/version" ]; then
rm -f /etc/chkservd.d/mailscanner
rm -f /var/run/chkservd/mailscanner
fi
chmod +x msuninstall.pl
./msuninstall.pl 3
echo
echo "All done."