#!/bin/sh
echo "Uninstalling csf and lfd..."
echo

perl /etc/csf/csf.pl -f
service lfd stop

/sbin/chkconfig csf off
/sbin/chkconfig lfd off
/sbin/chkconfig csf --del
/sbin/chkconfig lfd --del
rm -fv /etc/init.d/csf
rm -fv /etc/init.d/lfd
rm -fv /etc/chkserv.d/lfd
rm -fv /usr/sbin/csf
rm -fv /usr/sbin/lfd
rm -fv /usr/local/cpanel/whostmgr/docroot/cgi/addon_csf.cgi
rm -Rfv /usr/local/cpanel/whostmgr/docroot/cgi/fw
rm -fv /etc/cron.d/csf_update
rm -fv /etc/cron.d/lfdcron.sh
rm -fv /etc/cron.d/csfcron.sh
rm -fv /etc/logrotate.d/lfd

rm -fv /var/run/chkservd/lfd
replace 'lfd:1' '' -- /etc/chkserv.d/chkservd.conf
/scripts/restartsrv_chkservd

rm -Rfv /etc/csf
cd

echo
echo "...Done"
