Subversion Repositories ALCASAR

Rev

Rev 2867 | Rev 2870 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2867 Rev 2868
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-uninstall.sh 2867 2020-10-24 14:33:04Z rexy $
2
# $Id: alcasar-uninstall.sh 2868 2020-10-26 21:22:24Z rexy $
3
 
3
 
4
# alcasar-uninstall.sh
4
# alcasar-uninstall.sh
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
 
7
 
Line 116... Line 116...
116
	[ -e /etc/e2guardian/lists/urlregexplist.default ] && mv /etc/e2guardian/lists/urlregexplist.default /etc/e2guardian/lists/urlregexplist && echo -n "15"
116
	[ -e /etc/e2guardian/lists/urlregexplist.default ] && mv /etc/e2guardian/lists/urlregexplist.default /etc/e2guardian/lists/urlregexplist && echo -n "15"
117
}
117
}
118
 
118
 
119
antivirus ()
119
antivirus ()
120
{
120
{
121
	echo -en "(3) : "
121
	echo -en "(4) : "
122
	[ -e /lib/systemd/system/clamav-daemon.service.default ] && mv /lib/systemd/system/clamav-daemon.service.default /lib/systemd/system/clamav-daemon.service && echo -n "1, "
122
	[ -e /lib/systemd/system/clamav-daemon.service.default ] && mv /lib/systemd/system/clamav-daemon.service.default /lib/systemd/system/clamav-daemon.service && echo -n "1, "
-
 
123
	[ -e /lib/systemd/system/clamav-daemon.socket.default ] && mv /lib/systemd/system/clamav-daemon.socket.default /lib/systemd/system/clamav-daemon.socket && echo -n "2, "
123
	[ -e /etc/clamd.conf.default ] && mv /etc/clamd.conf.default /etc/clamd.conf && echo -n "2, "
124
	[ -e /etc/clamd.conf.default ] && mv /etc/clamd.conf.default /etc/clamd.conf && echo -n "3, "
124
	[ -e /etc/freshclam.conf.default ] && mv /etc/freshclam.conf.default /etc/freshclam.conf && echo -n "3"
125
	[ -e /etc/freshclam.conf.default ] && mv /etc/freshclam.conf.default /etc/freshclam.conf && echo -n "4"
125
}
126
}
126
 
127
 
127
ulogd ()
128
ulogd ()
128
{
129
{
129
	echo -en "(6) : "
130
	echo -en "(6) : "
Line 190... Line 191...
190
	[ -e /etc/anacrontab.default ] && mv /etc/anacrontab.default /etc/anacrontab && echo -n "12"
191
	[ -e /etc/anacrontab.default ] && mv /etc/anacrontab.default /etc/anacrontab && echo -n "12"
191
}
192
}
192
 
193
 
193
fail2ban ()
194
fail2ban ()
194
{
195
{
195
	echo -en "(6) : "
196
	echo -en "(11) : "
196
	[ -e /etc/fail2ban/jail.conf.default ] && mv /etc/fail2ban/jail.conf.default /etc/fail2ban/jail.conf && echo -n "1, "
197
	[ -e /etc/fail2ban/jail.conf.default ] && mv /etc/fail2ban/jail.conf.default /etc/fail2ban/jail.conf && echo -n "1, "
197
	[ -e /etc/fail2ban/action.d/iptables-allports.conf.default ] && mv /etc/fail2ban/action.d/iptables-allports.conf.default /etc/fail2ban/action.d/iptables-allports.conf # only for ALCASAR version <= V3.5.1
198
	[ -e /etc/fail2ban/action.d/iptables-allports.conf.default ] && mv /etc/fail2ban/action.d/iptables-allports.conf.default /etc/fail2ban/action.d/iptables-allports.conf # only for ALCASAR version <= V3.5.1
198
	i=2
199
	i=2
199
	for filter in `ls /etc/fail2ban/filter.d/alcasar_* 2>/dev/null`
200
	for filter in `ls /etc/fail2ban/filter.d/alcasar_* 2>/dev/null`
200
	do
201
	do
Line 355... Line 356...
355
	[ -e /usr/libexec/iptables.init.default ] && mv -f /usr/libexec/iptables.init.default /usr/libexec/iptables.init && echo -n "9"
356
	[ -e /usr/libexec/iptables.init.default ] && mv -f /usr/libexec/iptables.init.default /usr/libexec/iptables.init && echo -n "9"
356
	/usr/bin/systemctl restart network
357
	/usr/bin/systemctl restart network
357
	sleep 1
358
	sleep 1
358
fi
359
fi
359
 
360
 
-
 
361
# Reset "skip.list" (we keep "kernel" in order not to download kernel we don't want to have)
-
 
362
echo "/^kernel/" > /etc/urpmi/skip.list
-
 
363
 
360
# Cleaning (remove all "old" alcasar scripts)
364
# Cleaning (remove all "old" alcasar scripts)
361
echo -en "\n- End of cleaning ...\n"
365
echo -en "\n- End of cleaning ...\n"
362
for rm_fic in /usr/local/bin /usr/local/etc /usr/local/sbin
366
for rm_fic in /usr/local/bin /usr/local/etc /usr/local/sbin
363
do
367
do
364
	rm -rf $rm_fic/alcasar*
368
	rm -rf $rm_fic/alcasar*