Subversion Repositories ALCASAR

Rev

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

Rev 2772 Rev 2775
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-uninstall.sh 2772 2020-03-01 18:04:45Z rexy $
2
# $Id: alcasar-uninstall.sh 2775 2020-03-08 23:13:41Z 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 118... Line 118...
118
{
118
{
119
	echo -en "(6) : "
119
	echo -en "(6) : "
120
	if [ -e /etc/init.d/havp ]
120
	if [ -e /etc/init.d/havp ]
121
	then
121
	then
122
		[ -e /etc/havp/havp.config.default ] && mv /etc/havp/havp.config.default /etc/havp/havp.config && echo -n "1, "
122
		[ -e /etc/havp/havp.config.default ] && mv /etc/havp/havp.config.default /etc/havp/havp.config && echo -n "1, "
123
		[ -d /var/run/havp ] && rm -rf /var/run/havp && echo -n "2, "
123
		[ -d /run/havp ] && rm -rf /run/havp && echo -n "2, "
124
		[ -e /etc/init.d/havp.default ] && mv /etc/init.d/havp.default /etc/init.d/havp && echo -n "3, "
124
		[ -e /etc/init.d/havp.default ] && mv /etc/init.d/havp.default /etc/init.d/havp && echo -n "3, "
125
		[ -e /lib/systemd/system/havp.service ] && rm /lib/systemd/system/havp.service && echo -n "4, "
125
		[ -e /lib/systemd/system/havp.service ] && rm /lib/systemd/system/havp.service && echo -n "4, "
126
		[ -e /etc/freshclam.conf.default ] && mv /etc/freshclam.conf.default /etc/freshclam.conf && echo -n "5, "
126
		[ -e /etc/freshclam.conf.default ] && mv /etc/freshclam.conf.default /etc/freshclam.conf && echo -n "5, "
127
		userdel -r havp 2>/dev/null ; echo -n "6"
127
		userdel -r havp 2>/dev/null ; echo -n "6"
128
	else	echo -n "already uninstalled"
128
	else	echo -n "already uninstalled"
Line 133... Line 133...
133
{
133
{
134
	echo -en "(3) : "
134
	echo -en "(3) : "
135
	if [ -e /etc/init.d/tinyproxy ]
135
	if [ -e /etc/init.d/tinyproxy ]
136
	then
136
	then
137
		[ -e /etc/tinyproxy/tinyproxy.conf.default ] && mv /etc/tinyproxy/tinyproxy.conf.default /etc/tinyproxy/tinyproxy.conf && echo -n "1, "
137
		[ -e /etc/tinyproxy/tinyproxy.conf.default ] && mv /etc/tinyproxy/tinyproxy.conf.default /etc/tinyproxy/tinyproxy.conf && echo -n "1, "
138
		[ -d /var/run/tinyproxy ] && rm -rf /var/run/tinyproxy && echo -n "2, "
138
		[ -d /run/tinyproxy ] && rm -rf /run/tinyproxy && echo -n "2, "
139
		userdel -r tinyproxy 2>/dev/null && echo -n "3"
139
		userdel -r tinyproxy 2>/dev/null && echo -n "3"
140
	else echo -n "already uninstalled"
140
	else echo -n "already uninstalled"
141
	fi
141
	fi
142
}
142
}
143
 
143
 
Line 193... Line 193...
193
}
193
}
194
 
194
 
195
cron ()
195
cron ()
196
{
196
{
197
# /etc/cron.d/alcasar-daemon-watchdog is removed at the beginning of this script
197
# /etc/cron.d/alcasar-daemon-watchdog is removed at the beginning of this script
198
echo -en "(11) : "
198
echo -en "(13) : "
199
	i=1
199
	i=1
200
	for cron in `ls /etc/cron.d/alcasar-* 2>/dev/null`
200
	for cron in `ls /etc/cron.d/alcasar-* 2>/dev/null`
201
	do
201
	do
202
		rm $cron && echo -n "$i, "
202
		rm $cron && echo -n "$i, "
203
		i=`expr $i + 1`
203
		i=`expr $i + 1`
204
	done
204
	done
205
	[ -e /etc/crontab.default ] && mv /etc/crontab.default /etc/crontab && echo -n "10, "
205
	[ -e /etc/crontab.default ] && mv /etc/crontab.default /etc/crontab && echo -n "12, "
206
	[ -e /etc/anacrontab.default ] && mv /etc/anacrontab.default /etc/anacrontab && echo -n "11"
206
	[ -e /etc/anacrontab.default ] && mv /etc/anacrontab.default /etc/anacrontab && echo -n "13"
207
}
207
}
208
 
208
 
209
fail2ban ()
209
fail2ban ()
210
{
210
{
211
	echo -en "(7) : "
211
	echo -en "(7) : "