Subversion Repositories ALCASAR

Rev

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

Rev 1388 Rev 1391
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-uninstall.sh 1388 2014-06-15 14:47:10Z richard $
2
# $Id: alcasar-uninstall.sh 1391 2014-06-17 17:17:42Z 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 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
echo -n "Stop ALCASAR main services : "
18
for i in havp  gammu-smsd
19
for i in havp  gammu-smsd
19
do
20
do
20
	[ -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
21
done
22
done
22
for i in alcasar-load_balancing.service nfsen.service mysqld.service ntpd.service iptables.service ulogd-ext-access.service ulogd-ssh.service ulogd-traceability.service dansguardian.service httpd.service radiusd.service freshclam.service dnsmasq.service dnsmasq-blacklist.service dnsmasq-whitelist.service dhcpd.service chilli.service
23
for i in alcasar-load_balancing.service nfsen.service mysqld.service ntpd.service iptables.service ulogd-ext-access.service ulogd-ssh.service ulogd-traceability.service dansguardian.service httpd.service radiusd.service freshclam.service dnsmasq.service dnsmasq-blacklist.service dnsmasq-whitelist.service dhcpd.service chilli.service
23
do
24
do
24
	[ -e /lib/systemd/system/$i ] && systemctl disable $i && systemctl stop $i 1>/dev/null
25
	[ -e /lib/systemd/system/$i ] && systemctl disable $i && systemctl stop $i 1>/dev/null && echo -n "."
25
done
26
done
26
 
27
 
27
echo "Stop ALCASAR main functions : "
28
echo "Stop ALCASAR main functions : "
28
 
29
 
29
#init
30
#init
Line 196... Line 197...
196
 
197
 
197
#gammu-smsd
198
#gammu-smsd
198
echo -en "\n- gammu-smsd(3) :"
199
echo -en "\n- gammu-smsd(3) :"
199
[ -e /etc/gammu_smsd_conf ] && rm -f /etc/gammu_smsd_conf && echo -n "1, "
200
[ -e /etc/gammu_smsd_conf ] && rm -f /etc/gammu_smsd_conf && echo -n "1, "
200
[ -e /etc/udev/rules.d/66-huawei.rules ] && rm -f /etc/udev/rules.d/66-huawei.rules && echo -n "2, "
201
[ -e /etc/udev/rules.d/66-huawei.rules ] && rm -f /etc/udev/rules.d/66-huawei.rules && echo -n "2, "
201
[ -e /var/log/gammu-smsd ] && rm -rf /var/log/gammu-smsd && echo ,-n "3"
202
[ -e /var/log/gammu-smsd ] && rm -rf /var/log/gammu-smsd && echo -n "3"
202
sleep 1
203
sleep 1
203
 
204
 
204
#network
205
#network
205
echo -en "\n- network(9) : "
206
echo -en "\n- network(9) : "
206
hostname localhost
207
hostname localhost