Subversion Repositories ALCASAR

Rev

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

Rev 1154 Rev 1157
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-uninstall.sh 1154 2013-07-15 14:27:10Z crox53 $
2
# $Id: alcasar-uninstall.sh 1157 2013-07-16 10:48:11Z stephane $
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 13... Line 13...
13
echo "-----------------------------------------------------------------------------"
13
echo "-----------------------------------------------------------------------------"
14
echo "**                     Uninstall/Update ALCASAR                            **"
14
echo "**                     Uninstall/Update ALCASAR                            **"
15
echo "-----------------------------------------------------------------------------"
15
echo "-----------------------------------------------------------------------------"
16
echo
16
echo
17
#services_stop
17
#services_stop
18
for i in squid ntpd iptables ulogd dansguardian chilli httpd radiusd freshclam havp dnsmasq mysqld named dhcpd nfsen
18
for i in squid ntpd iptables ulogd dansguardian chilli httpd radiusd freshclam havp dnsmasq mysqld named dhcpd
19
do
19
do
20
	[ -e /etc/init.d/$i ] && /sbin/chkconfig --del $i && /etc/init.d/$i stop && killall $i 2>/dev/null
20
	[ -e /etc/init.d/$i ] && /sbin/chkconfig --del $i && /etc/init.d/$i stop && killall $i 2>/dev/null
21
done
21
done
22
echo "Stop ALCASAR main functions : "
22
echo "Stop ALCASAR main functions : "
23
 
23
 
Line 130... Line 130...
130
	rm -f /etc/ulogd-* && echo -n "2"
130
	rm -f /etc/ulogd-* && echo -n "2"
131
else echo -n "nothing to do"
131
else echo -n "nothing to do"
132
fi	
132
fi	
133
sleep 1
133
sleep 1
134
 
134
 
-
 
135
#awstats
-
 
136
echo -en "\n- awstats(1) : "
-
 
137
[ -e /etc/awstats/awstats.conf.default ] && mv /etc/awstats/awstats.conf.default /etc/awstats/awstats.conf && echo -n "1"
-
 
138
sleep 1
-
 
139
 
135
#DnsMasq
140
#DnsMasq
136
echo -en "\n- dnsmasq(4) : "
141
echo -en "\n- dnsmasq(4) : "
137
if [ -e /etc/init.d/dnsmasq ]
142
if [ -e /etc/init.d/dnsmasq ]
138
then
143
then
139
	[ -e /etc/dnsmasq.conf.default ] && mv /etc/dnsmasq.conf.default /etc/dnsmasq.conf && echo -n "1, "
144
	[ -e /etc/dnsmasq.conf.default ] && mv /etc/dnsmasq.conf.default /etc/dnsmasq.conf && echo -n "1, "
Line 170... Line 175...
170
[ -e /etc/cron.d/alcasar-mysql ] && rm -f /etc/cron.d/alcasar-mysql && echo -n "3, "
175
[ -e /etc/cron.d/alcasar-mysql ] && rm -f /etc/cron.d/alcasar-mysql && echo -n "3, "
171
[ -e /etc/cron.d/alcasar-export_log ] && rm -f /etc/cron.d/alcasar-export_log && echo -n "4, "
176
[ -e /etc/cron.d/alcasar-export_log ] && rm -f /etc/cron.d/alcasar-export_log && echo -n "4, "
172
[ -e /etc/cron.d/alcasar-clean_log ] && rm -f /etc/cron.d/alcasar-clean_log && echo -n "5, "
177
[ -e /etc/cron.d/alcasar-clean_log ] && rm -f /etc/cron.d/alcasar-clean_log && echo -n "5, "
173
[ -e /etc/cron.d/alcasar-clean_import ] && rm -f /etc/cron.d/alcasar-clean_import && echo -n "6, "
178
[ -e /etc/cron.d/alcasar-clean_import ] && rm -f /etc/cron.d/alcasar-clean_import && echo -n "6, "
174
[ -e /etc/cron.d/alcasar-distrib-updates ] && rm -f /etc/cron.d/alcasar-distrib-updates && echo -n "7, "
179
[ -e /etc/cron.d/alcasar-distrib-updates ] && rm -f /etc/cron.d/alcasar-distrib-updates && echo -n "7, "
-
 
180
[ -e /etc/cron.d/awstats ] && rm -f /etc/cron.d/awstats && echo -n "8, "
175
[ -e /etc/cron.d/freeradius-web ] && rm -f /etc/cron.d/freeradius-web && echo -n "9, "
181
[ -e /etc/cron.d/freeradius-web ] && rm -f /etc/cron.d/freeradius-web && echo -n "9, "
176
[ -e /etc/cron.d/alcasar-watchdog ] && rm -f /etc/cron.d/alcasar-watchdog && echo -n "10"
182
[ -e /etc/cron.d/alcasar-watchdog ] && rm -f /etc/cron.d/alcasar-watchdog && echo -n "10"
177
rm -f /etc/cron.d/coova /etc/cron.d/alcasar-bl_download
183
rm -f /etc/cron.d/coova /etc/cron.d/alcasar-bl_download
178
sleep 1
184
sleep 1
179
 
185
 
Line 217... Line 223...
217
	rm -rf $rm_fic/alcasar*
223
	rm -rf $rm_fic/alcasar*
218
	done
224
	done
219
echo
225
echo
220
 
226
 
221
# suppression des exceptions de mises à jours ( coova-chilli et freeradius)
227
# suppression des exceptions de mises à jours ( coova-chilli et freeradius)
222
sed -i '/coova.*/d' /etc/urpmi/skip.list
228
sed -i '/coova.*/d' /etc/urpmi/skip.list
223
 
229