Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar-uninstall.sh 2732 2019-05-26 22:03:17Z rexy $
|
2 |
# $Id: alcasar-uninstall.sh 2739 2019-06-06 22:11:37Z rexy $
|
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 20... |
Line 20... |
20 |
[ -e /root/grub.default ] && mv -f /root/grub.default /etc/grub.d/10_linux && echo -n "3"
|
20 |
[ -e /root/grub.default ] && mv -f /root/grub.default /etc/grub.d/10_linux && echo -n "3"
|
21 |
}
|
21 |
}
|
22 |
|
22 |
|
23 |
ACC ()
|
23 |
ACC ()
|
24 |
{
|
24 |
{
|
25 |
echo -en "(8) : "
|
25 |
echo -en "(9) : "
|
26 |
[ -d /var/www/html ] && rm -rf /var/www/html && echo -n "1, "
|
26 |
[ -d /var/www/html ] && rm -rf /var/www/html && echo -n "1, "
|
27 |
[ -d /etc/freeradius-web ] && rm -rf /etc/freeradius-webl && echo -n "2, "
|
27 |
[ -d /etc/freeradius-web ] && rm -rf /etc/freeradius-web && echo -n "2, "
|
28 |
[ -e /etc/php.ini.default ] && mv -f /etc/php.ini.default /etc/php.ini && echo -n "3, "
|
28 |
[ -e /etc/php.ini.default ] && mv -f /etc/php.ini.default /etc/php.ini && echo -n "3, "
|
29 |
[ -d /usr/local/etc/digest ] && rm -rf /usr/local/etc/digest && echo -n "4, "
|
- |
|
30 |
[ -e /etc/lighttpd/lighttpd.conf.default ] && mv /etc/lighttpd/lighttpd.conf.default /etc/lighttpd/lighttpd.conf && echo -n "5, "
|
29 |
[ -e /etc/lighttpd/lighttpd.conf.default ] && mv -f /etc/lighttpd/lighttpd.conf.default /etc/lighttpd/lighttpd.conf && echo -n "4, "
|
31 |
[ -e /etc/lighttpd/modules.conf.default ] && mv /etc/lighttpd/modules.conf.default /etc/lighttpd/modules.conf && echo -n "6, "
|
30 |
[ -e /etc/lighttpd/modules.conf.default ] && mv -f /etc/lighttpd/modules.conf.default /etc/lighttpd/modules.conf && echo -n "5, "
|
32 |
[ -e /etc/lighttpd/conf.d/fastcgi.conf.default ] && mv /etc/lighttpd/conf.d/fastcgi.conf.default /etc/lighttpd/conf.d/fastcgi.conf && echo -n "7, "
|
31 |
[ -e /etc/lighttpd/conf.d/fastcgi.conf.default ] && mv -f /etc/lighttpd/conf.d/fastcgi.conf.default /etc/lighttpd/conf.d/fastcgi.conf && echo -n "6, "
|
- |
|
32 |
[ -e /etc/php-fpm.conf.default ] && mv -f /etc/php-fpm.conf.default /etc/php-fpm.conf && echo -n "7, "
|
33 |
[ -e /etc/lighttpd/vhosts.d/alcasar.conf ] && rm -f /etc/lighttpd/vhosts.d/alcasar.conf && echo -n "8"
|
33 |
[ -d /etc/lighttpd/vhosts.d ] && rm -rf /etc/lighttpd/vhosts.d && echo -n "8, "
|
- |
|
34 |
[ -d /usr/local/etc/digest ] && rm -rf /usr/local/etc/digest && echo -n "9"
|
34 |
}
|
35 |
}
|
35 |
|
36 |
|
36 |
CA ()
|
37 |
CA ()
|
37 |
{
|
38 |
{
|
38 |
echo -en "(5) : "
|
39 |
echo -en "(5) : "
|
Line 284... |
Line 285... |
284 |
if [ $mode == "full" ]
|
285 |
if [ $mode == "full" ]
|
285 |
then
|
286 |
then
|
286 |
echo "----------------------------------------------------------------------------"
|
287 |
echo "----------------------------------------------------------------------------"
|
287 |
echo "** Uninstall/Désinstallation d'ALCASAR **"
|
288 |
echo "** Uninstall/Désinstallation d'ALCASAR **"
|
288 |
echo "----------------------------------------------------------------------------"
|
289 |
echo "----------------------------------------------------------------------------"
|
289 |
services="alcasar-load_balancing vnstat havp freshclam ntpd lighttpd radiusd mysqld unbound unbound-blacklist unbound-whitelist dnsmasq-whitelist unbound-blackhole tinyproxy nfsen fail2ban iptables ulogd-ext-access ulogd-ssh ulogd-traceability e2guardian sshd chilli"
|
290 |
services="alcasar-load_balancing vnstat havp freshclam ntpd php-fpm lighttpd radiusd mysqld unbound unbound-blacklist unbound-whitelist dnsmasq-whitelist unbound-blackhole tinyproxy nfsen fail2ban iptables ulogd-ext-access ulogd-ssh ulogd-traceability e2guardian sshd chilli"
|
290 |
/usr/local/bin/alcasar-logout.sh all # logout everybody
|
291 |
/usr/local/bin/alcasar-logout.sh all # logout everybody
|
291 |
else
|
292 |
else
|
292 |
echo "--------------------------------------------------------------------------"
|
293 |
echo "--------------------------------------------------------------------------"
|
293 |
echo "** update/mise à jour d'ALCASAR **"
|
294 |
echo "** update/mise à jour d'ALCASAR **"
|
294 |
echo "--------------------------------------------------------------------------"
|
295 |
echo "--------------------------------------------------------------------------"
|
295 |
# unbound, iptables & sshd should stay on to allow remote update
|
296 |
# unbound, iptables & sshd should stay on to allow remote update
|
296 |
services="alcasar-load_balancing vnstat havp freshclam ntpd lighttpd radiusd mysqld unbound-blacklist unbound-whitelist dnsmasq-whitelist unbound-blackhole tinyproxy nfsen fail2ban ulogd-ext-access ulogd-ssh ulogd-traceability e2guardian chilli"
|
297 |
services="alcasar-load_balancing vnstat havp freshclam ntpd php-fpm lighttpd radiusd mysqld unbound-blacklist unbound-whitelist dnsmasq-whitelist unbound-blackhole tinyproxy nfsen fail2ban ulogd-ext-access ulogd-ssh ulogd-traceability e2guardian chilli"
|
297 |
/usr/local/bin/alcasar-bypass.sh -on # to allow remote update
|
298 |
/usr/local/bin/alcasar-bypass.sh -on # to allow remote update
|
298 |
fi
|
299 |
fi
|
299 |
old_services=" dnsmasq dnsmasq-blacklist dnsmasq-blackhole"
|
300 |
old_services=" dnsmasq dnsmasq-blacklist dnsmasq-blackhole"
|
300 |
services+=$old_services
|
301 |
services+=$old_services
|
301 |
|
302 |
|