Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar-uninstall.sh 1567 2015-02-11 23:11:33Z richard $
|
2 |
# $Id: alcasar-uninstall.sh 1574 2015-03-01 23:17:07Z 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 19... |
Line 19... |
19 |
# services_stop
|
19 |
# services_stop
|
20 |
/usr/local/bin/alcasar-sms.sh --stop
|
20 |
/usr/local/bin/alcasar-sms.sh --stop
|
21 |
|
21 |
|
22 |
for i in alcasar-load_balancing freshclam ntpd dansguardian httpd radiusd mysqld dnsmasq dnsmasq-blacklist dnsmasq-whitelist dnsmasq-blackhole tinyproxy havp nfsen chilli fail2ban iptables ulogd-ext-access ulogd-ssh ulogd-traceability vnstat
|
22 |
for i in alcasar-load_balancing freshclam ntpd dansguardian httpd radiusd mysqld dnsmasq dnsmasq-blacklist dnsmasq-whitelist dnsmasq-blackhole tinyproxy havp nfsen chilli fail2ban iptables ulogd-ext-access ulogd-ssh ulogd-traceability vnstat
|
23 |
do
|
23 |
do
|
24 |
[ -e /lib/systemd/system/$i.service ] && systemctl disable $i.service && systemctl stop $i.service 1>/dev/null
|
24 |
[ -e /lib/systemd/system/$i.service ] && /usr/bin/systemctl disable $i.service && /usr/bin/systemctl stop $i.service 1>/dev/null
|
25 |
done
|
25 |
done
|
26 |
|
26 |
|
27 |
echo "Reset ALCASAR main functions : "
|
27 |
echo "Reset ALCASAR main functions : "
|
28 |
|
28 |
|
29 |
#init
|
29 |
#init
|
Line 59... |
Line 59... |
59 |
|
59 |
|
60 |
#init_db
|
60 |
#init_db
|
61 |
echo -en "\n- init_db(2) : "
|
61 |
echo -en "\n- init_db(2) : "
|
62 |
[ -e /etc/my.cnf.default ] && mv -f /etc/my.cnf.default /etc/my.cnf && echo -n "1, "
|
62 |
[ -e /etc/my.cnf.default ] && mv -f /etc/my.cnf.default /etc/my.cnf && echo -n "1, "
|
63 |
[ -e /lib/systemd/system/mysqld.service.default ] && mv -f /lib/systemd/system/mysqld.service.default /lib/systemd/system/mysqld.service && echo -n "2"
|
63 |
[ -e /lib/systemd/system/mysqld.service.default ] && mv -f /lib/systemd/system/mysqld.service.default /lib/systemd/system/mysqld.service && echo -n "2"
|
64 |
systemctl daemon-reload
|
64 |
/usr/bin/systemctl daemon-reload
|
65 |
rm -rf /var/lib/mysql
|
65 |
rm -rf /var/lib/mysql
|
66 |
sleep 1
|
66 |
sleep 1
|
67 |
|
67 |
|
68 |
#param_radius
|
68 |
#param_radius
|
69 |
echo -en "\n- radius(9) : "
|
69 |
echo -en "\n- radius(9) : "
|