#!/bin/bash # # Remueve APF e Instala CSF en cPanel # by Esteban Borges [esteban.borges@gmail.com] # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US if [ -e /etc/csf/csf.conf ] && [ -e /usr/sbin/csf ]; then echo "CSF ya esta instalado." echo exit 0 fi if [ ! -d /root/temp ]; then mkdir /root/temp fi if [ ! -e /root/temp/allow_hosts.rules ] || [ ! -e /root/temp/apf.conf ]; then echo -n "Realizando Backup de APF" cp /etc/apf/allow_hosts.rules /root/temp -f 2> /dev/null cp /etc/apf/conf.apf /root/temp -f 2> /dev/null echo -n "..." ; echo " Listo!" fi echo -n "Borrando APF" cd /root/temp rm -fr /etc/apf 2> /dev/null rm -fr /usr/local/apf 2> /dev/null rm /etc/cron.daily/fw -f 2> /dev/null rm /etc/cron.daily/bfd -f 2> /dev/null rm /usr/local/bfd -fr 2> /dev/null echo -n "..."; echo " Listo!" echo -n "Descargando e Instalando CSF" wget -q http://configserver.com/free/csf.tgz tar -xpzf csf.tgz cd csf sh install.cpanel.sh 1> /dev/null echo -n "..." ; echo " Listo!" echo echo "Solo resta configurar /etc/csf/csf.allow y /etc/csf/csf.conf =)"