Subversion Repositories ALCASAR

Rev

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

Rev 1486 Rev 1488
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-uninstall.sh 1486 2014-11-13 11:15:17Z richard $
2
# $Id: alcasar-uninstall.sh 1488 2014-11-16 23:10:57Z 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 127... Line 127...
127
	userdel -r tinyproxy 2>/dev/null && echo -n "2, "
127
	userdel -r tinyproxy 2>/dev/null && echo -n "2, "
128
else	echo -n "uninstalled"
128
else	echo -n "uninstalled"
129
fi
129
fi
130
sleep 1
130
sleep 1
131
 
131
 
132
 
-
 
133
 
-
 
134
#param_ulogd
132
#param_ulogd
135
echo -en "\n- ulogd(6) : "
133
echo -en "\n- ulogd(6) : "
136
i=0
134
i=0
137
for log_type in traceability ssh ext-access
135
for log_type in traceability ssh ext-access
138
      do
136
      do
Line 152... Line 150...
152
echo -en "\n- dnsmasq(8) : "
150
echo -en "\n- dnsmasq(8) : "
153
if [ -e /lib/systemd/system/dnsmasq.service ]
151
if [ -e /lib/systemd/system/dnsmasq.service ]
154
then
152
then
155
	[ -e /etc/sysconfig/dnsmasq.default ] && mv /etc/sysconfig/dnsmasq.default /etc/sysconfig/dnsmasq && echo -n "1, "
153
	[ -e /etc/sysconfig/dnsmasq.default ] && mv /etc/sysconfig/dnsmasq.default /etc/sysconfig/dnsmasq && echo -n "1, "
156
	[ -e /etc/dnsmasq.conf.default ] && mv /etc/dnsmasq.conf.default /etc/dnsmasq.conf && echo -n "2, "
154
	[ -e /etc/dnsmasq.conf.default ] && mv /etc/dnsmasq.conf.default /etc/dnsmasq.conf && echo -n "2, "
157
	i=0
155
	i=2
158
	for list in blacklist whitelist blackhole
156
	for list in blacklist whitelist blackhole
159
	do
157
	do
160
		i=`expr $i + 1`
158
		i=`expr $i + 1`
161
		[ -e /etc/dnsmasq-$list.conf ] && rm /etc/dnsmasq-$list.conf && echo -n "$i, "
159
		[ -e /etc/dnsmasq-$list.conf ] && rm /etc/dnsmasq-$list.conf && echo -n "$i, "
162
		i=`expr $i + 1`
160
		i=`expr $i + 1`
Line 211... Line 209...
211
[ -e /etc/udev/rules.d/66-huawei.rules ] && rm -f /etc/udev/rules.d/66-huawei.rules && echo -n "2, "
209
[ -e /etc/udev/rules.d/66-huawei.rules ] && rm -f /etc/udev/rules.d/66-huawei.rules && echo -n "2, "
212
[ -e /var/log/gammu-smsd ] && rm -rf /var/log/gammu-smsd && echo -n "3"
210
[ -e /var/log/gammu-smsd ] && rm -rf /var/log/gammu-smsd && echo -n "3"
213
sleep 1
211
sleep 1
214
 
212
 
215
#network
213
#network
216
echo -en "\n- network(9) : "
214
echo -en "\n- network(8) : "
217
hostname localhost
215
hostname localhost
218
CONF_FILE="/usr/local/etc/alcasar.conf"
216
CONF_FILE="/usr/local/etc/alcasar.conf"
219
EXTIF=`grep ^EXTIF= $CONF_FILE|cut -d"=" -f2`				# EXTernal InterFace
217
EXTIF=`grep ^EXTIF= $CONF_FILE|cut -d"=" -f2`		# EXTernal InterFace
220
INTIF=`grep ^INTIF= $CONF_FILE|cut -d"=" -f2`				# INTernal InterFace
218
INTIF=`grep ^INTIF= $CONF_FILE|cut -d"=" -f2`		# INTernal InterFace
221
i=0
219
i=0
222
for nic in $EXTIF $INTIF
220
for nic in $EXTIF $INTIF
223
	do
221
	do
224
	i=`expr $i + 1`
222
	i=`expr $i + 1`
225
	/sbin/ifdown $nic
223
	/sbin/ifdown $nic
Line 228... Line 226...
228
[ -e /etc/sysconfig/network.default ] && mv /etc/sysconfig/network.default /etc/sysconfig/network && echo -n "3, "
226
[ -e /etc/sysconfig/network.default ] && mv /etc/sysconfig/network.default /etc/sysconfig/network && echo -n "3, "
229
[ -e /etc/hosts.default ] && mv /etc/hosts.default /etc/hosts && echo -n "4, "
227
[ -e /etc/hosts.default ] && mv /etc/hosts.default /etc/hosts && echo -n "4, "
230
[ -e /etc/ntp.conf.default ] && mv /etc/ntp.conf.default /etc/ntp.conf && echo -n "5, "
228
[ -e /etc/ntp.conf.default ] && mv /etc/ntp.conf.default /etc/ntp.conf && echo -n "5, "
231
[ -e /etc/hosts.allow.default ] && mv /etc/hosts.allow.default /etc/hosts.allow && echo -n "6, "
229
[ -e /etc/hosts.allow.default ] && mv /etc/hosts.allow.default /etc/hosts.allow && echo -n "6, "
232
[ -e /etc/hosts.deny.default ] && mv /etc/hosts.deny.default /etc/hosts.deny && echo -n "7, "
230
[ -e /etc/hosts.deny.default ] && mv /etc/hosts.deny.default /etc/hosts.deny && echo -n "7, "
233
[ -e /etc/sysconfig/iptables ] && rm -f /etc/sysconfig/iptables && echo -n "8, "
-
 
234
[ -e /etc/modprobe.preload.default ] && mv /etc/modprobe.preload.default /etc/modprobe.preload && echo -n "9"
231
[ -e /etc/modprobe.preload.default ] && mv /etc/modprobe.preload.default /etc/modprobe.preload && echo -n "8"
235
 
232
 
236
/sbin/ifup $EXTIF
233
/sbin/ifup $EXTIF
237
sleep 1
234
sleep 1
238
 
235
 
239
#post_install
236
#post_install
Line 260... Line 257...
260
	do
257
	do
261
	rm -rf $rm_fic/alcasar*
258
	rm -rf $rm_fic/alcasar*
262
	done
259
	done
263
echo
260
echo
264
 
261
 
265
#suppression des exceptions de mises à jours ( coova-chilli et freeradius)
-
 
266
sed -i '/coova.*/d' /etc/urpmi/skip.list
-