Subversion Repositories ALCASAR

Rev

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

Rev 1833 Rev 1893
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-uninstall.sh 1833 2016-04-24 15:32:42Z richard $
2
# $Id: alcasar-uninstall.sh 1893 2016-05-18 07:50:25Z 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 44... Line 44...
44
echo -en "\n- init(1) : "
44
echo -en "\n- init(1) : "
45
# les fichiers situés dans /usr/local/ seront supprimés à la fin car encore utiles ici
45
# les fichiers situés dans /usr/local/ seront supprimés à la fin car encore utiles ici
46
rm -f /root/ALCASAR* && echo -n "1"
46
rm -f /root/ALCASAR* && echo -n "1"
47
sleep 1
47
sleep 1
48
 
48
 
49
echo -en "\n- time(2) : "
-
 
50
[ -e /etc/ntp/step-stickers.default ] && mv /etc/ntp/step-stickers.default /etc/ntp/step-sticker.conf && echo -n "1, "
-
 
51
[ -e /etc/ntp.conf.default ] && mv /etc/ntp.conf.default /etc/ntp.conf && echo -n "2"
-
 
52
 
-
 
53
echo -en "\n- ACC(11) : "
49
echo -en "\n- ACC(11) : "
54
[ -d /var/www/html ] && rm -rf /var/www/html && echo -n "1, "
50
[ -d /var/www/html ] && rm -rf /var/www/html && echo -n "1, "
55
[ -d /etc/freeradius-web ] && rm -rf /etc/freeradius-webl && echo -n "2, "
51
[ -d /etc/freeradius-web ] && rm -rf /etc/freeradius-webl && echo -n "2, "
56
[ -e /etc/httpd/conf/httpd.conf.default ] && mv /etc/httpd/conf/httpd.conf.default /etc/httpd/conf/httpd.conf && echo -n "3, "
52
[ -e /etc/php.ini.default ] && mv /etc/php.ini.default /etc/php.ini && echo -n "3, "
57
[ -e /etc/httpd/conf/modules.d/00_base.conf.default ] && mv /etc/httpd/conf/modules.d/00_base.conf.default /etc/httpd/conf/modules.d/00_base.conf && echo -n "4, "
53
[ -e /etc/httpd/conf/httpd.conf.default ] && mv /etc/httpd/conf/httpd.conf.default /etc/httpd/conf/httpd.conf && echo -n "4, "
58
[ -e /etc/php.ini.default ] && mv /etc/php.ini.default /etc/php.ini && echo -n "5, "
-
 
59
[ -e /etc/httpd/conf/vhosts-ssl.default ] && FIC_VIRTUAL_SSL=`find /etc/httpd/conf -type f -name *default_ssl_vhost.conf` && mv /etc/httpd/conf/vhosts-ssl.default $FIC_VIRTUAL_SSL && echo -n "6, "
54
[ -e /etc/httpd/conf/modules.d/00_base.conf.default ] && mv /etc/httpd/conf/modules.d/00_base.conf.default /etc/httpd/conf/modules.d/00_base.conf && echo -n "5, "
60
if [ -d /usr/local/etc/digest ] # v >= 2.0
-
 
61
	then rm -rf /usr/local/etc/digest && echo -n "7, "
-
 
62
	else echo -n "7, "
-
 
63
fi
-
 
64
[ -e /etc/httpd/conf/webapps.d/alcasar.conf ] && rm -f /etc/httpd/conf/webapps.d/alcasar.conf && echo -n "8, "
55
[ -e /etc/httpd/conf/conf.d/ssl.conf.default ] && mv /etc/httpd/conf/conf.d/ssl.conf.default /etc/httpd/conf/conf.d/ssl.conf && echo -n "6, "
65
[ -e /etc/httpd/conf/conf.d/ssl.conf.default ] && mv /etc/httpd/conf/conf.d/ssl.conf.default /etc/httpd/conf/conf.d/ssl.conf && echo -n "9, "
56
[ -e /etc/httpd/conf/conf.d/multilang-errordoc.conf.default ] && mv /etc/httpd/conf/conf.d/multilang-errordoc.conf.default /etc/httpd/conf/conf.d/multilang-errordoc.conf && echo -n "7, "
66
[ -e /usr/share/httpd/error/include/top.html.default ] && mv /usr/share/httpd/error/include/top.html.default /usr/share/httpd/error/include/top.html && echo -n "10, "
57
[ -e /usr/share/httpd/error/include/top.html.default ] && mv /usr/share/httpd/error/include/top.html.default /usr/share/httpd/error/include/top.html && echo -n "8, "
67
[ -e /usr/share/httpd/error/include/bottom.html.default ] && mv /usr/share/httpd/error/include/bottom.html.default /usr/share/httpd/error/include/top.html && echo -n "11"
58
[ -e /usr/share/httpd/error/include/bottom.html.default ] && mv /usr/share/httpd/error/include/bottom.html.default /usr/share/httpd/error/include/top.html && echo -n "9, "
-
 
59
[ -d /usr/local/etc/digest ] && rm -rf /usr/local/etc/digest && echo -n "10, "
-
 
60
[ -e /etc/httpd/conf/webapps.d/alcasar.conf ] && rm -f /etc/httpd/conf/webapps.d/alcasar.conf && echo -n "11"
68
sleep 1
61
sleep 1
69
 
62
 
70
echo -en "\n- CA(4) : "
63
echo -en "\n- CA(5) : "
71
[ -e /etc/pki/CA/alcasar-ca.crt ] && rm -f /etc/pki/CA/alcasar-ca.crt && echo -n "1, "
64
[ -e /etc/pki/CA/alcasar-ca.crt ] && rm -f /etc/pki/CA/alcasar-ca.crt && echo -n "1, "
72
[ -e /etc/pki/CA/private/alcasar-ca.key ] && rm -f /etc/pki/CA/private/alcasar-ca.key && echo -n "2, "
65
[ -e /etc/pki/CA/private/alcasar-ca.key ] && rm -f /etc/pki/CA/private/alcasar-ca.key && echo -n "2, "
73
[ -e /etc/pki/tls/certs/alcasar.crt ] && rm -f /etc/pki/tls/certs/alcasar.crt && echo -n "3, "
66
[ -e /etc/pki/tls/certs/alcasar.crt ] && rm -f /etc/pki/tls/certs/alcasar.crt && echo -n "3, "
74
[ -e /etc/pki/tls/private/alcasar.key ] && rm -f /etc/pki/tls/private/alcasar.key && echo -n "4"
67
[ -e /etc/pki/tls/private/alcasar.key ] && rm -f /etc/pki/tls/private/alcasar.key && echo -n "4, "
-
 
68
[ -e /etc/httpd/conf/vhosts-ssl.default ] && FIC_VIRTUAL_SSL=`find /etc/httpd/conf -type f -name *default_ssl_vhost.conf` && mv /etc/httpd/conf/vhosts-ssl.default $FIC_VIRTUAL_SSL && echo -n "5"
75
sleep 1
69
sleep 1
76
 
70
 
-
 
71
echo -en "\n- time_server(2) : "
-
 
72
[ -e /etc/ntp/step-stickers.default ] && mv /etc/ntp/step-stickers.default /etc/ntp/step-sticker && echo -n "1, "
-
 
73
[ -e /etc/ntp.conf.default ] && mv /etc/ntp.conf.default /etc/ntp.conf && echo -n "2"
-
 
74
 
77
echo -en "\n- init_db(2) : "
75
echo -en "\n- init_db(2) : "
78
[ -e /etc/my.cnf.default ] && mv -f /etc/my.cnf.default /etc/my.cnf && echo -n "1, "
76
[ -e /etc/my.cnf.default ] && mv -f /etc/my.cnf.default /etc/my.cnf && echo -n "1, "
79
[ -e /lib/systemd/system/mysqld.service.default ] && mv -f /lib/systemd/system/mysqld.service.default /lib/systemd/system/mysqld.service && echo -n "2"
77
[ -e /lib/systemd/system/mysqld.service.default ] && mv -f /lib/systemd/system/mysqld.service.default /lib/systemd/system/mysqld.service && echo -n "2"
80
/usr/bin/systemctl daemon-reload
78
/usr/bin/systemctl daemon-reload
81
rm -rf /var/lib/mysql
79
rm -rf /var/lib/mysql