mirror of
https://github.com/waytotheweb/scripts.git
synced 2026-03-29 19:27:07 +00:00
51 lines
1.3 KiB
Bash
51 lines
1.3 KiB
Bash
#!/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
|
|
|
|
if [ ! -e "msuninstall.pl" ]; then
|
|
echo "Download msuninstall.pl here first"
|
|
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."
|