Subversion Repositories ALCASAR

Rev

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

Rev 1488 Rev 1502
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-uninstall.sh 1488 2014-11-16 23:10:57Z richard $
2
# $Id: alcasar-uninstall.sh 1502 2014-11-27 18:09:24Z 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 14... Line 14...
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
echo -n "Stop ALCASAR main services : "
18
echo -n "Stop ALCASAR main services : "
19
for i in havp gammu-smsd
19
for i in tinyproxy
20
do
20
do
21
	[ -e /etc/init.d/$i ] && /sbin/chkconfig --del $i && /etc/init.d/$i stop && killall $i 2>/dev/null
21
	[ -e /etc/init.d/$i ] && /sbin/chkconfig --del $i && /etc/init.d/$i stop && killall $i 2>/dev/null
22
done
22
done
-
 
23
 
-
 
24
/usr/local/bin/alcasar-smsd --stop 
-
 
25
 
23
for i in alcasar-load_balancing nfsen mysqld ntpd fail2ban iptables ulogd-ext-access ulogd-ssh ulogd-traceability tinyproxy dansguardian httpd radiusd freshclam dnsmasq dnsmasq-blacklist dnsmasq-whitelist dnsmasq-blackhole dhcpd chilli
26
for i in alcasar-load_balancing mysqld ntpd fail2ban iptables ulogd-ext-access ulogd-ssh ulogd-traceability dansguardian httpd radiusd freshclam dnsmasq dnsmasq-blacklist dnsmasq-whitelist dnsmasq-blackhole dhcpd chilli havp nfsen 
24
do
27
do
25
	[ -e /lib/systemd/system/$i.service ] && systemctl disable $i.service && systemctl stop $i.service 1>/dev/null
28
	[ -e /lib/systemd/system/$i.service ] && systemctl disable $i.service && systemctl stop $i.service 1>/dev/null
26
done
29
done
27
 
30
 
28
echo "Stop ALCASAR main functions : "
31
echo "Reset ALCASAR main functions : "
29
 
32
 
30
#init
33
#init
31
echo -en "\n- init(1) : "
34
echo -en "\n- init(1) : "
32
#les fichiers situés dans /usr/local/ seront supprimés à la fin car encore utiles ici
35
#les fichiers situés dans /usr/local/ seront supprimés à la fin car encore utiles ici
33
rm -f /root/ALCASAR* && echo -n "1"
36
rm -f /root/ALCASAR* && echo -n "1"