Subversion Repositories ALCASAR

Rev

Rev 1201 | Rev 1228 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log

Rev 1201 Rev 1211
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-uninstall.sh 1201 2013-09-02 07:48:07Z crox53 $
2
# $Id: alcasar-uninstall.sh 1211 2013-09-17 15:19:57Z crox53 $
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
for i in alcasar-load_balancing.service
-
 
23
do
-
 
24
	[ -e /lib/systemd/system/$i ] && systemctl disable $i && systemctl stop $i
-
 
25
done
-
 
26
 
22
echo "Stop ALCASAR main functions : "
27
echo "Stop ALCASAR main functions : "
23
 
28
 
24
#init
29
#init
25
echo -en "\n- init(1) : "
30
echo -en "\n- init(1) : "
26
#les fichiers situés dans /usr/local/ seront supprimés à la fin car encore utiles ici
31
#les fichiers situés dans /usr/local/ seront supprimés à la fin car encore utiles ici
Line 211... Line 216...
211
[ -e /etc/logrotate.d/mysqld ] && rm -f /etc/logrotate.d/mysqld && echo -n "6, "
216
[ -e /etc/logrotate.d/mysqld ] && rm -f /etc/logrotate.d/mysqld && echo -n "6, "
212
[ -e /etc/logrotate.d/httpd ] && rm -f /etc/logrotate.d/httpd && echo -n "7, "
217
[ -e /etc/logrotate.d/httpd ] && rm -f /etc/logrotate.d/httpd && echo -n "7, "
213
[ -e /etc/logrotate.d/squid ] && rm -f /etc/logrotate.d/squid && echo -n "8, "
218
[ -e /etc/logrotate.d/squid ] && rm -f /etc/logrotate.d/squid && echo -n "8, "
214
[ -e /etc/logrotate.d/radiusd ] && rm -f /etc/logrotate.d/radiusd && echo -n "9, "
219
[ -e /etc/logrotate.d/radiusd ] && rm -f /etc/logrotate.d/radiusd && echo -n "9, "
215
[ -e /etc/logrotate.d/ulogd ] && rm -f /etc/logrotate.d/ulogd && echo -n "10, "
220
[ -e /etc/logrotate.d/ulogd ] && rm -f /etc/logrotate.d/ulogd && echo -n "10, "
216
[ -e /etc/logrotate.d/dnsmasq ] && rm -f /etc/logrotate.d/dnsmasq && echo -n "11"
221
[ -e /etc/logrotate.d/dnsmasq ] && rm -f /etc/logrotate.d/dnsmasq && echo -n "11, "
217
[ -e /lib/systemd/system/alcasar-load_balancing.service ] &&/lib/systemd/system/alcasar-load_balancing.service rm -f  && echo -n " ,12"
222
[ -e /lib/systemd/system/alcasar-load_balancing.service ] && rm -f /lib/systemd/system/alcasar-load_balancing.service && echo -n "12"
218
sleep 1
223
sleep 1
219
 
224
 
220
#nettoyage (on retire les services supprimés ou remplacés dans la nouvelle version)
225
#nettoyage (on retire les services supprimés ou remplacés dans la nouvelle version)
221
echo -en "\n- cleaning() : "
226
echo -en "\n- cleaning() : "
222
for rm_fic in /usr/local/bin /usr/local/sbin /usr/local/etc
227
for rm_fic in /usr/local/bin /usr/local/sbin /usr/local/etc