Subversion Repositories ALCASAR

Rev

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

Rev 1355 Rev 1357
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-uninstall.sh 1355 2014-05-20 15:03:10Z richard $
2
# $Id: alcasar-uninstall.sh 1357 2014-05-22 15:10:39Z richard $
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 55... Line 55...
55
sleep 1
55
sleep 1
56
 
56
 
57
#init_db
57
#init_db
58
echo -en "\n- init_db(2) : "
58
echo -en "\n- init_db(2) : "
59
[ -e /etc/my.cnf.default ] && mv -f /etc/my.cnf.default /etc/my.cnf && echo -n "1, "
59
[ -e /etc/my.cnf.default ] && mv -f /etc/my.cnf.default /etc/my.cnf && echo -n "1, "
60
[ -e /usr/lib/systemd/system/mysqld.service.default ] && mv -f /usr/lib/systemd/system/mysqld.service.default /usr/lib/systemd/system/mysqld.service && echo -n "2"
60
[ -e /lib/systemd/system/mysqld.service.default ] && mv -f /lib/systemd/system/mysqld.service.default /lib/systemd/system/mysqld.service && echo -n "2"
61
systemctl daemon-reload
61
systemctl daemon-reload
62
rm -rf /var/lib/mysql
62
rm -rf /var/lib/mysql
63
sleep 1
63
sleep 1
64
 
64
 
65
#param_radius
65
#param_radius
Line 121... Line 121...
121
[ -e /etc/dansguardian/lists/exceptioniplist.default ] && mv /etc/dansguardian/lists/exceptioniplist.default /etc/dansguardian/lists/exceptioniplist && echo -n "7, "
121
[ -e /etc/dansguardian/lists/exceptioniplist.default ] && mv /etc/dansguardian/lists/exceptioniplist.default /etc/dansguardian/lists/exceptioniplist && echo -n "7, "
122
[ -e /etc/dansguardian/lists/bannedsitelist.default ] && mv /etc/dansguardian/lists/bannedsitelist.default /etc/dansguardian/lists/bannedsitelist && echo -n "8"
122
[ -e /etc/dansguardian/lists/bannedsitelist.default ] && mv /etc/dansguardian/lists/bannedsitelist.default /etc/dansguardian/lists/bannedsitelist && echo -n "8"
123
sleep 1
123
sleep 1
124
 
124
 
125
#antivirus
125
#antivirus
126
echo -en "\n- antivirus(2) : "
126
echo -en "\n- antivirus(4) : "
127
if [ -e /etc/init.d/havp ] 
127
if [ -e /etc/init.d/havp ] 
128
	then
128
	then
129
	[ -e /etc/havp/havp.config.default ] && mv /etc/havp/havp.config.default /etc/havp/havp.config && echo -n "1, "
129
	[ -e /etc/havp/havp.config.default ] && mv /etc/havp/havp.config.default /etc/havp/havp.config && echo -n "1, "
130
	userdel -r havp 2>/dev/null && echo -n "2"
130
	userdel -r havp 2>/dev/null && echo -n "2, "
131
	[ `grep havp /etc/fstab|wc -l` -ne "0" ] && $SED "/havp/d" /etc/fstab # anciennes versions (mémoire tampon sur disque)
131
	[ `grep havp /etc/fstab|wc -l` -ne "0" ] && $SED "/havp/d" /etc/fstab # anciennes versions (mémoire tampon sur disque)
-
 
132
	[ -e /etc/init.d/havp.default ] && mv /etc/init.d/havp.default /etc/init.d/havp && echo -n "3, "
-
 
133
	[ -e /etc/freshclam.conf.default ] && mv /etc/freshclam.conf.default /etc/freshclam.conf && echo -n "4"
132
else	echo -n "uninstalled"
134
else	echo -n "uninstalled"
133
fi
135
fi
134
sleep 1
136
sleep 1
135
 
137
 
136
#param_ulogd
138
#param_ulogd
Line 151... Line 153...
151
else echo -n "uninstalled"
153
else echo -n "uninstalled"
152
fi
154
fi
153
sleep 1
155
sleep 1
154
 
156
 
155
#DnsMasq
157
#DnsMasq
156
echo -en "\n- dnsmasq(4) : "
158
echo -en "\n- dnsmasq(6) : "
157
if [ -e /etc/init.d/dnsmasq ]
159
if [ -e /lib/systemd/system/dnsmasq.service ]
158
then
160
then
-
 
161
	[ -e /etc/sysconfig/dnsmasq.default ] && mv /etc/sysconfig/dnsmasq.default /etc/sysconfig/dnsmasq && echo -n "1 ,"
159
	[ -e /etc/dnsmasq.conf.default ] && mv /etc/dnsmasq.conf.default /etc/dnsmasq.conf && echo -n "1, "
162
	[ -e /etc/dnsmasq.conf.default ] && mv /etc/dnsmasq.conf.default /etc/dnsmasq.conf && echo -n "2, "
160
	[ -e /etc/dnsmasq-blackhole.conf ] && rm -f /etc/dnsmasq-blackhole.conf && echo -n "2, "
163
	[ -e /etc/dnsmasq-blacklist.conf ] && rm /etc/dnsmasq-blacklist.conf && echo -n "3, "
161
	[ -d /etc/dnsmasq.d ] && rm -rf /etc/dnsmasq.d
164
	[ -e /etc/dnsmasq-whitelist.conf ] && rm /etc/dnsmasq-whitelist.conf && echo -n "4, "
162
	[ -e /etc/init.d/dnsmasq.default ] && mv /etc/init.d/dnsmasq.default /etc/init.d/dnsmasq && echo -n "3, "
165
	[ -e /lib/systemd/system/dnsmasq-blacklist.service ] && rm /lib/systemd/system/dnsmasq-blacklist.service && echo -n "5, "
163
	[ -e /etc/sysconfig/dnsmasq.default ] && mv /etc/sysconfig/dnsmasq.default /etc/sysconfig/dnsmasq && echo -n "4"
166
	[ -e /lib/systemd/system/dnsmasq-whitelist.service ] && rm /lib/systemd/system/dnsmasq-whitelist.service && echo -n "6"
164
else echo -n "uninstalled"
-
 
165
fi
-
 
166
sleep 1
-
 
167
 
-
 
168
#Bind
-
 
169
echo -en "\n- bind(1) : "
-
 
170
if [ -e /etc/init.d/named ]
-
 
171
then
-
 
172
	/usr/sbin/urpme --auto bind --auto-orphans && echo -n "1"
-
 
173
else echo -n "uninstalled"
167
else echo -n "uninstalled"
174
fi
168
fi
175
sleep 1
169
sleep 1
176
 
170
 
177
#dhcpd
171
#dhcpd