mirror of
https://github.com/waytotheweb/scripts.git
synced 2026-03-29 14:17:07 +00:00
cxs, osm and csf
This commit is contained in:
77
csf/uninstall.cpanel.sh
Normal file
77
csf/uninstall.cpanel.sh
Normal file
@@ -0,0 +1,77 @@
|
||||
#!/bin/sh
|
||||
echo "Uninstalling csf and lfd..."
|
||||
echo
|
||||
|
||||
/usr/sbin/csf -f
|
||||
|
||||
if test `cat /proc/1/comm` = "systemd"
|
||||
then
|
||||
systemctl disable csf.service
|
||||
systemctl disable lfd.service
|
||||
systemctl stop csf.service
|
||||
systemctl stop lfd.service
|
||||
|
||||
rm -fv /usr/lib/systemd/system/csf.service
|
||||
rm -fv /usr/lib/systemd/system/lfd.service
|
||||
systemctl daemon-reload
|
||||
else
|
||||
if [ -f /etc/redhat-release ]; then
|
||||
/sbin/chkconfig csf off
|
||||
/sbin/chkconfig lfd off
|
||||
/sbin/chkconfig csf --del
|
||||
/sbin/chkconfig lfd --del
|
||||
elif [ -f /etc/debian_version ] || [ -f /etc/lsb-release ]; then
|
||||
update-rc.d -f lfd remove
|
||||
update-rc.d -f csf remove
|
||||
elif [ -f /etc/gentoo-release ]; then
|
||||
rc-update del lfd default
|
||||
rc-update del csf default
|
||||
elif [ -f /etc/slackware-version ]; then
|
||||
rm -vf /etc/rc.d/rc3.d/S80csf
|
||||
rm -vf /etc/rc.d/rc4.d/S80csf
|
||||
rm -vf /etc/rc.d/rc5.d/S80csf
|
||||
rm -vf /etc/rc.d/rc3.d/S85lfd
|
||||
rm -vf /etc/rc.d/rc4.d/S85lfd
|
||||
rm -vf /etc/rc.d/rc5.d/S85lfd
|
||||
else
|
||||
/sbin/chkconfig csf off
|
||||
/sbin/chkconfig lfd off
|
||||
/sbin/chkconfig csf --del
|
||||
/sbin/chkconfig lfd --del
|
||||
fi
|
||||
rm -fv /etc/init.d/csf
|
||||
rm -fv /etc/init.d/lfd
|
||||
fi
|
||||
|
||||
if [ -e "/usr/local/cpanel/bin/unregister_appconfig" ]; then
|
||||
cd /
|
||||
/usr/local/cpanel/bin/unregister_appconfig csf
|
||||
fi
|
||||
|
||||
rm -fv /etc/chkserv.d/lfd
|
||||
rm -fv /usr/sbin/csf
|
||||
rm -fv /usr/sbin/lfd
|
||||
rm -fv /etc/cron.d/csf_update
|
||||
rm -fv /etc/cron.d/lfd-cron
|
||||
rm -fv /etc/cron.d/csf-cron
|
||||
rm -fv /etc/logrotate.d/lfd
|
||||
rm -fv /usr/local/man/man1/csf.man.1
|
||||
|
||||
/bin/rm -fv /usr/local/cpanel/whostmgr/docroot/cgi/addon_csf.cgi
|
||||
/bin/rm -Rfv /usr/local/cpanel/whostmgr/docroot/cgi/csf
|
||||
|
||||
/bin/rm -fv /usr/local/cpanel/whostmgr/docroot/cgi/configserver/csf.cgi
|
||||
/bin/rm -Rfv /usr/local/cpanel/whostmgr/docroot/cgi/configserver/csf
|
||||
|
||||
/bin/rm -fv /usr/local/cpanel/Cpanel/Config/ConfigObj/Driver/ConfigServercsf.pm
|
||||
/bin/rm -Rfv /usr/local/cpanel/Cpanel/Config/ConfigObj/Driver/ConfigServercsf
|
||||
/bin/touch /usr/local/cpanel/Cpanel/Config/ConfigObj/Driver
|
||||
|
||||
rm -fv /var/run/chkservd/lfd
|
||||
sed -i 's/lfd:1//' /etc/chkserv.d/chkservd.conf
|
||||
/scripts/restartsrv_chkservd
|
||||
|
||||
rm -Rfv /etc/csf /usr/local/csf /var/lib/csf
|
||||
|
||||
echo
|
||||
echo "...Done"
|
||||
61
csf/uninstall.cwp.sh
Normal file
61
csf/uninstall.cwp.sh
Normal file
@@ -0,0 +1,61 @@
|
||||
#!/bin/sh
|
||||
echo "Uninstalling csf and lfd..."
|
||||
echo
|
||||
|
||||
/usr/sbin/csf -f
|
||||
|
||||
if test `cat /proc/1/comm` = "systemd"
|
||||
then
|
||||
systemctl disable csf.service
|
||||
systemctl disable lfd.service
|
||||
systemctl stop lfd.service
|
||||
systemctl stop csf.service
|
||||
|
||||
rm -fv /usr/lib/systemd/system/csf.service
|
||||
rm -fv /usr/lib/systemd/system/lfd.service
|
||||
systemctl daemon-reload
|
||||
else
|
||||
if [ -f /etc/redhat-release ]; then
|
||||
/sbin/chkconfig csf off
|
||||
/sbin/chkconfig lfd off
|
||||
/sbin/chkconfig csf --del
|
||||
/sbin/chkconfig lfd --del
|
||||
elif [ -f /etc/debian_version ] || [ -f /etc/lsb-release ]; then
|
||||
update-rc.d -f lfd remove
|
||||
update-rc.d -f csf remove
|
||||
elif [ -f /etc/gentoo-release ]; then
|
||||
rc-update del lfd default
|
||||
rc-update del csf default
|
||||
elif [ -f /etc/slackware-version ]; then
|
||||
rm -vf /etc/rc.d/rc3.d/S80csf
|
||||
rm -vf /etc/rc.d/rc4.d/S80csf
|
||||
rm -vf /etc/rc.d/rc5.d/S80csf
|
||||
rm -vf /etc/rc.d/rc3.d/S85lfd
|
||||
rm -vf /etc/rc.d/rc4.d/S85lfd
|
||||
rm -vf /etc/rc.d/rc5.d/S85lfd
|
||||
else
|
||||
/sbin/chkconfig csf off
|
||||
/sbin/chkconfig lfd off
|
||||
/sbin/chkconfig csf --del
|
||||
/sbin/chkconfig lfd --del
|
||||
fi
|
||||
rm -fv /etc/init.d/csf
|
||||
rm -fv /etc/init.d/lfd
|
||||
fi
|
||||
|
||||
rm -fv /etc/chkserv.d/lfd
|
||||
rm -fv /usr/sbin/csf
|
||||
rm -fv /usr/sbin/lfd
|
||||
rm -fv /etc/cron.d/csf_update
|
||||
rm -fv /etc/cron.d/lfd-cron
|
||||
rm -fv /etc/cron.d/csf-cron
|
||||
rm -fv /etc/logrotate.d/lfd
|
||||
rm -fv /usr/local/man/man1/csf.man.1
|
||||
|
||||
rm -fv /usr/local/cwpsrv/htdocs/resources/admin/modules/csfofficial.php
|
||||
rm -fv /usr/local/cwpsrv/htdocs/resources/admin/modules/csf.pl
|
||||
rm -fv /usr/local/cwpsrv/htdocs/resources/admin/addons/ajax/ajax_csfframe.php
|
||||
rm -Rfv /usr/local/cwpsrv/htdocs/admin/design/csf/
|
||||
|
||||
echo
|
||||
echo "...Done"
|
||||
70
csf/uninstall.cyberpanel.sh
Normal file
70
csf/uninstall.cyberpanel.sh
Normal file
@@ -0,0 +1,70 @@
|
||||
#!/bin/sh
|
||||
echo "Uninstalling csf and lfd..."
|
||||
echo
|
||||
|
||||
/usr/sbin/csf -f
|
||||
|
||||
if test `cat /proc/1/comm` = "systemd"
|
||||
then
|
||||
systemctl disable csf.service
|
||||
systemctl disable lfd.service
|
||||
systemctl stop lfd.service
|
||||
systemctl stop csf.service
|
||||
|
||||
rm -fv /usr/lib/systemd/system/csf.service
|
||||
rm -fv /usr/lib/systemd/system/lfd.service
|
||||
systemctl daemon-reload
|
||||
else
|
||||
if [ -f /etc/redhat-release ]; then
|
||||
/sbin/chkconfig csf off
|
||||
/sbin/chkconfig lfd off
|
||||
/sbin/chkconfig csf --del
|
||||
/sbin/chkconfig lfd --del
|
||||
elif [ -f /etc/debian_version ] || [ -f /etc/lsb-release ]; then
|
||||
update-rc.d -f lfd remove
|
||||
update-rc.d -f csf remove
|
||||
elif [ -f /etc/gentoo-release ]; then
|
||||
rc-update del lfd default
|
||||
rc-update del csf default
|
||||
elif [ -f /etc/slackware-version ]; then
|
||||
rm -vf /etc/rc.d/rc3.d/S80csf
|
||||
rm -vf /etc/rc.d/rc4.d/S80csf
|
||||
rm -vf /etc/rc.d/rc5.d/S80csf
|
||||
rm -vf /etc/rc.d/rc3.d/S85lfd
|
||||
rm -vf /etc/rc.d/rc4.d/S85lfd
|
||||
rm -vf /etc/rc.d/rc5.d/S85lfd
|
||||
else
|
||||
/sbin/chkconfig csf off
|
||||
/sbin/chkconfig lfd off
|
||||
/sbin/chkconfig csf --del
|
||||
/sbin/chkconfig lfd --del
|
||||
fi
|
||||
rm -fv /etc/init.d/csf
|
||||
rm -fv /etc/init.d/lfd
|
||||
fi
|
||||
|
||||
rm -fv /etc/chkserv.d/lfd
|
||||
rm -fv /usr/sbin/csf
|
||||
rm -fv /usr/sbin/lfd
|
||||
rm -fv /etc/cron.d/csf_update
|
||||
rm -fv /etc/cron.d/lfd-cron
|
||||
rm -fv /etc/cron.d/csf-cron
|
||||
rm -fv /etc/logrotate.d/lfd
|
||||
rm -fv /usr/local/man/man1/csf.man.1
|
||||
|
||||
rm -Rfv /usr/local/CyberCP/configservercsf
|
||||
rm -fv /home/cyberpanel/plugins/configservercsf
|
||||
rm -Rfv /usr/local/CyberCP/public/static/configservercsf
|
||||
|
||||
sed -i "/configservercsf/d" /usr/local/CyberCP/CyberCP/settings.py
|
||||
sed -i "/configservercsf/d" /usr/local/CyberCP/CyberCP/urls.py
|
||||
if [ ! -e /etc/cxs/cxs.pl ]; then
|
||||
sed -i "/configserver/d" /usr/local/CyberCP/baseTemplate/templates/baseTemplate/index.html
|
||||
fi
|
||||
|
||||
service lscpd restart
|
||||
|
||||
rm -Rfv /etc/csf /usr/local/csf /var/lib/csf
|
||||
|
||||
echo
|
||||
echo "...Done"
|
||||
61
csf/uninstall.directadmin.sh
Normal file
61
csf/uninstall.directadmin.sh
Normal file
@@ -0,0 +1,61 @@
|
||||
#!/bin/sh
|
||||
echo "Uninstalling csf and lfd..."
|
||||
echo
|
||||
|
||||
sed -i 's/lfd=ON/lfd=OFF/' /usr/local/directadmin/data/admin/services.status
|
||||
|
||||
/usr/sbin/csf -f
|
||||
|
||||
if test `cat /proc/1/comm` = "systemd"
|
||||
then
|
||||
systemctl disable csf.service
|
||||
systemctl disable lfd.service
|
||||
systemctl stop lfd.service
|
||||
systemctl stop csf.service
|
||||
|
||||
rm -fv /usr/lib/systemd/system/csf.service
|
||||
rm -fv /usr/lib/systemd/system/lfd.service
|
||||
systemctl daemon-reload
|
||||
else
|
||||
if [ -f /etc/redhat-release ]; then
|
||||
/sbin/chkconfig csf off
|
||||
/sbin/chkconfig lfd off
|
||||
/sbin/chkconfig csf --del
|
||||
/sbin/chkconfig lfd --del
|
||||
elif [ -f /etc/debian_version ] || [ -f /etc/lsb-release ]; then
|
||||
update-rc.d -f lfd remove
|
||||
update-rc.d -f csf remove
|
||||
elif [ -f /etc/gentoo-release ]; then
|
||||
rc-update del lfd default
|
||||
rc-update del csf default
|
||||
elif [ -f /etc/slackware-version ]; then
|
||||
rm -vf /etc/rc.d/rc3.d/S80csf
|
||||
rm -vf /etc/rc.d/rc4.d/S80csf
|
||||
rm -vf /etc/rc.d/rc5.d/S80csf
|
||||
rm -vf /etc/rc.d/rc3.d/S85lfd
|
||||
rm -vf /etc/rc.d/rc4.d/S85lfd
|
||||
rm -vf /etc/rc.d/rc5.d/S85lfd
|
||||
else
|
||||
/sbin/chkconfig csf off
|
||||
/sbin/chkconfig lfd off
|
||||
/sbin/chkconfig csf --del
|
||||
/sbin/chkconfig lfd --del
|
||||
fi
|
||||
rm -fv /etc/init.d/csf
|
||||
rm -fv /etc/init.d/lfd
|
||||
fi
|
||||
|
||||
rm -fv /etc/chkserv.d/lfd
|
||||
rm -fv /usr/sbin/csf
|
||||
rm -fv /usr/sbin/lfd
|
||||
rm -fv /etc/cron.d/csf_update
|
||||
rm -fv /etc/cron.d/lfd-cron
|
||||
rm -fv /etc/cron.d/csf-cron
|
||||
rm -Rfv /usr/local/directadmin/plugins/csf
|
||||
rm -fv /etc/logrotate.d/lfd
|
||||
rm -fv /usr/local/man/man1/csf.man.1
|
||||
|
||||
rm -Rfv /etc/csf /usr/local/csf /var/lib/csf
|
||||
|
||||
echo
|
||||
echo "...Done"
|
||||
58
csf/uninstall.generic.sh
Normal file
58
csf/uninstall.generic.sh
Normal file
@@ -0,0 +1,58 @@
|
||||
#!/bin/sh
|
||||
echo "Uninstalling csf and lfd..."
|
||||
echo
|
||||
|
||||
/usr/sbin/csf -f
|
||||
|
||||
if test `cat /proc/1/comm` = "systemd"
|
||||
then
|
||||
systemctl disable csf.service
|
||||
systemctl disable lfd.service
|
||||
systemctl stop lfd.service
|
||||
systemctl stop csf.service
|
||||
|
||||
rm -fv /usr/lib/systemd/system/csf.service
|
||||
rm -fv /usr/lib/systemd/system/lfd.service
|
||||
systemctl daemon-reload
|
||||
else
|
||||
if [ -f /etc/redhat-release ]; then
|
||||
/sbin/chkconfig csf off
|
||||
/sbin/chkconfig lfd off
|
||||
/sbin/chkconfig csf --del
|
||||
/sbin/chkconfig lfd --del
|
||||
elif [ -f /etc/debian_version ] || [ -f /etc/lsb-release ]; then
|
||||
update-rc.d -f lfd remove
|
||||
update-rc.d -f csf remove
|
||||
elif [ -f /etc/gentoo-release ]; then
|
||||
rc-update del lfd default
|
||||
rc-update del csf default
|
||||
elif [ -f /etc/slackware-version ]; then
|
||||
rm -vf /etc/rc.d/rc3.d/S80csf
|
||||
rm -vf /etc/rc.d/rc4.d/S80csf
|
||||
rm -vf /etc/rc.d/rc5.d/S80csf
|
||||
rm -vf /etc/rc.d/rc3.d/S85lfd
|
||||
rm -vf /etc/rc.d/rc4.d/S85lfd
|
||||
rm -vf /etc/rc.d/rc5.d/S85lfd
|
||||
else
|
||||
/sbin/chkconfig csf off
|
||||
/sbin/chkconfig lfd off
|
||||
/sbin/chkconfig csf --del
|
||||
/sbin/chkconfig lfd --del
|
||||
fi
|
||||
rm -fv /etc/init.d/csf
|
||||
rm -fv /etc/init.d/lfd
|
||||
fi
|
||||
|
||||
rm -fv /etc/chkserv.d/lfd
|
||||
rm -fv /usr/sbin/csf
|
||||
rm -fv /usr/sbin/lfd
|
||||
rm -fv /etc/cron.d/csf_update
|
||||
rm -fv /etc/cron.d/lfd-cron
|
||||
rm -fv /etc/cron.d/csf-cron
|
||||
rm -fv /etc/logrotate.d/lfd
|
||||
rm -fv /usr/local/man/man1/csf.man.1
|
||||
|
||||
rm -Rfv /etc/csf /usr/local/csf /var/lib/csf
|
||||
|
||||
echo
|
||||
echo "...Done"
|
||||
64
csf/uninstall.interworx.sh
Normal file
64
csf/uninstall.interworx.sh
Normal file
@@ -0,0 +1,64 @@
|
||||
#!/bin/sh
|
||||
echo "Uninstalling csf and lfd..."
|
||||
echo
|
||||
|
||||
/usr/sbin/csf -f
|
||||
|
||||
if test `cat /proc/1/comm` = "systemd"
|
||||
then
|
||||
systemctl disable csf.service
|
||||
systemctl disable lfd.service
|
||||
systemctl stop lfd.service
|
||||
systemctl stop csf.service
|
||||
|
||||
rm -fv /usr/lib/systemd/system/csf.service
|
||||
rm -fv /usr/lib/systemd/system/lfd.service
|
||||
systemctl daemon-reload
|
||||
else
|
||||
if [ -f /etc/redhat-release ]; then
|
||||
/sbin/chkconfig csf off
|
||||
/sbin/chkconfig lfd off
|
||||
/sbin/chkconfig csf --del
|
||||
/sbin/chkconfig lfd --del
|
||||
elif [ -f /etc/debian_version ] || [ -f /etc/lsb-release ]; then
|
||||
update-rc.d -f lfd remove
|
||||
update-rc.d -f csf remove
|
||||
elif [ -f /etc/gentoo-release ]; then
|
||||
rc-update del lfd default
|
||||
rc-update del csf default
|
||||
elif [ -f /etc/slackware-version ]; then
|
||||
rm -vf /etc/rc.d/rc3.d/S80csf
|
||||
rm -vf /etc/rc.d/rc4.d/S80csf
|
||||
rm -vf /etc/rc.d/rc5.d/S80csf
|
||||
rm -vf /etc/rc.d/rc3.d/S85lfd
|
||||
rm -vf /etc/rc.d/rc4.d/S85lfd
|
||||
rm -vf /etc/rc.d/rc5.d/S85lfd
|
||||
else
|
||||
/sbin/chkconfig csf off
|
||||
/sbin/chkconfig lfd off
|
||||
/sbin/chkconfig csf --del
|
||||
/sbin/chkconfig lfd --del
|
||||
fi
|
||||
rm -fv /etc/init.d/csf
|
||||
rm -fv /etc/init.d/lfd
|
||||
fi
|
||||
|
||||
rm -fv /etc/chkserv.d/lfd
|
||||
rm -fv /usr/sbin/csf
|
||||
rm -fv /usr/sbin/lfd
|
||||
rm -fv /etc/cron.d/csf_update
|
||||
rm -fv /etc/cron.d/lfd-cron
|
||||
rm -fv /etc/cron.d/csf-cron
|
||||
rm -fv /etc/logrotate.d/lfd
|
||||
rm -fv /usr/local/man/man1/csf.man.1
|
||||
|
||||
/usr/local/interworx/bin/nodeworx.pex -u --controller Plugins --action edit --plugin_name configservercsf --status 0 -n
|
||||
rm -Rfv /etc/csf /usr/local/csf /var/lib/csf /usr/local/interworx/plugins/configservercsf /usr/local/interworx/html/configserver/csf
|
||||
chattr -ia /etc/apf/apf
|
||||
if [ -e "/etc/apf/apf.old" ]; then
|
||||
cp -avf /etc/apf/apf.old /etc/apf/apf
|
||||
chmod 750 /etc/apf/apf
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "...Done"
|
||||
61
csf/uninstall.vesta.sh
Normal file
61
csf/uninstall.vesta.sh
Normal file
@@ -0,0 +1,61 @@
|
||||
#!/bin/sh
|
||||
echo "Uninstalling csf and lfd..."
|
||||
echo
|
||||
|
||||
/usr/sbin/csf -f
|
||||
|
||||
if test `cat /proc/1/comm` = "systemd"
|
||||
then
|
||||
systemctl disable csf.service
|
||||
systemctl disable lfd.service
|
||||
systemctl stop lfd.service
|
||||
systemctl stop csf.service
|
||||
|
||||
rm -fv /usr/lib/systemd/system/csf.service
|
||||
rm -fv /usr/lib/systemd/system/lfd.service
|
||||
systemctl daemon-reload
|
||||
else
|
||||
if [ -f /etc/redhat-release ]; then
|
||||
/sbin/chkconfig csf off
|
||||
/sbin/chkconfig lfd off
|
||||
/sbin/chkconfig csf --del
|
||||
/sbin/chkconfig lfd --del
|
||||
elif [ -f /etc/debian_version ] || [ -f /etc/lsb-release ]; then
|
||||
update-rc.d -f lfd remove
|
||||
update-rc.d -f csf remove
|
||||
elif [ -f /etc/gentoo-release ]; then
|
||||
rc-update del lfd default
|
||||
rc-update del csf default
|
||||
elif [ -f /etc/slackware-version ]; then
|
||||
rm -vf /etc/rc.d/rc3.d/S80csf
|
||||
rm -vf /etc/rc.d/rc4.d/S80csf
|
||||
rm -vf /etc/rc.d/rc5.d/S80csf
|
||||
rm -vf /etc/rc.d/rc3.d/S85lfd
|
||||
rm -vf /etc/rc.d/rc4.d/S85lfd
|
||||
rm -vf /etc/rc.d/rc5.d/S85lfd
|
||||
else
|
||||
/sbin/chkconfig csf off
|
||||
/sbin/chkconfig lfd off
|
||||
/sbin/chkconfig csf --del
|
||||
/sbin/chkconfig lfd --del
|
||||
fi
|
||||
rm -fv /etc/init.d/csf
|
||||
rm -fv /etc/init.d/lfd
|
||||
fi
|
||||
|
||||
rm -fv /etc/chkserv.d/lfd
|
||||
rm -fv /usr/sbin/csf
|
||||
rm -fv /usr/sbin/lfd
|
||||
rm -fv /etc/cron.d/csf_update
|
||||
rm -fv /etc/cron.d/lfd-cron
|
||||
rm -fv /etc/cron.d/csf-cron
|
||||
rm -fv /etc/logrotate.d/lfd
|
||||
rm -fv /usr/local/man/man1/csf.man.1
|
||||
|
||||
rm -fv /usr/sbin/csf /usr/local/vesta/bin/csf.pl
|
||||
rm -Rfv /etc/csf /usr/local/vesta/web/list/csf/
|
||||
rm -fv /usr/local/csf/lib/ConfigServer/csf.pm
|
||||
sed -i "/CSF/d" /usr/local/vesta/web/templates/admin/panel.html
|
||||
|
||||
echo
|
||||
echo "...Done"
|
||||
Reference in New Issue
Block a user