Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar-uninstall.sh 2494 2018-02-26 01:33:06Z tom.houdayer $
|
2 |
# $Id: alcasar-uninstall.sh 2521 2018-04-02 19:46:16Z armand.ito $
|
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 99... |
Line 99... |
99 |
[ -e /usr/libexec/chilli ] && rm /usr/libexec/chilli && echo -n "2, "
|
99 |
[ -e /usr/libexec/chilli ] && rm /usr/libexec/chilli && echo -n "2, "
|
100 |
[ -e /etc/chilli.conf.default ] && mv /etc/chilli.conf.default /etc/chilli.conf && echo -n "3, "
|
100 |
[ -e /etc/chilli.conf.default ] && mv /etc/chilli.conf.default /etc/chilli.conf && echo -n "3, "
|
101 |
[ -e /lib/systemd/system/chilli.service ] && rm /lib/systemd/system/chilli.service && echo -n "4"
|
101 |
[ -e /lib/systemd/system/chilli.service ] && rm /lib/systemd/system/chilli.service && echo -n "4"
|
102 |
}
|
102 |
}
|
103 |
|
103 |
|
104 |
dansguardian ()
|
104 |
e2guardian ()
|
105 |
{
|
105 |
{
|
106 |
echo -en "(8) : "
|
106 |
echo -en "(8) : "
|
107 |
[ -d /var/dansguardian ] && rm -rf /var/dansguardian && echo -n "1, "
|
107 |
[ -d /var/e2guardian ] && rm -rf /var/e2guardian && echo -n "1, "
|
108 |
[ -e /etc/dansguardian/dansguardian.conf.default ] && mv /etc/dansguardian/dansguardian.conf.default /etc/dansguardian/dansguardian.conf && echo -n "2, "
|
108 |
[ -e /etc/e2guardian/e2guardian.conf.default ] && mv /etc/e2guardian/e2guardian.conf.default /etc/e2guardian/e2guardian.conf && echo -n "2, "
|
109 |
[ -e /etc/dansguardian/lists/bannedphraselist.default ] && mv /etc/dansguardian/lists/bannedphraselist.default /etc/dansguardian/lists/bannedphraselist && echo -n "3, "
|
109 |
[ -e /etc/e2guardian/lists/bannedphraselist.default ] && mv /etc/e2guardian/lists/bannedphraselist.default /etc/e2guardian/lists/bannedphraselist && echo -n "3, "
|
110 |
[ -e /etc/dansguardian/dansguardianf1.conf.default ] && mv /etc/dansguardian/dansguardianf1.conf.default /etc/dansguardian/dansguardianf1.conf && echo -n "4, "
|
110 |
[ -e /etc/e2guardian/e2guardianf1.conf.default ] && mv /etc/e2guardian/e2guardianf1.conf.default /etc/e2guardian/e2guardianf1.conf && echo -n "4, "
|
111 |
[ -e /etc/dansguardian/lists/bannedextensionlist.default ] && mv /etc/dansguardian/lists/bannedextensionlist.default /etc/dansguardian/lists/bannedextensionlist && echo -n "5, "
|
111 |
[ -e /etc/e2guardian/lists/bannedextensionlist.default ] && mv /etc/e2guardian/lists/bannedextensionlist.default /etc/e2guardian/lists/bannedextensionlist && echo -n "5, "
|
112 |
[ -e /etc/dansguardian/lists/bannedmimetypelist.default ] && mv /etc/dansguardian/lists/bannedmimetypelist.default /etc/dansguardian/lists/bannedmimetypelist && echo -n "6, "
|
112 |
[ -e /etc/e2guardian/lists/bannedmimetypelist.default ] && mv /etc/e2guardian/lists/bannedmimetypelist.default /etc/e2guardian/lists/bannedmimetypelist && echo -n "6, "
|
113 |
[ -e /etc/dansguardian/lists/exceptioniplist.default ] && mv /etc/dansguardian/lists/exceptioniplist.default /etc/dansguardian/lists/exceptioniplist && echo -n "7, "
|
113 |
[ -e /etc/e2guardian/lists/exceptioniplist.default ] && mv /etc/e2guardian/lists/exceptioniplist.default /etc/e2guardian/lists/exceptioniplist && echo -n "7, "
|
114 |
[ -e /etc/dansguardian/lists/bannedsitelist.default ] && mv /etc/dansguardian/lists/bannedsitelist.default /etc/dansguardian/lists/bannedsitelist && echo -n "8"
|
114 |
[ -e /etc/e2guardian/lists/bannedsitelist.default ] && mv /etc/e2guardian/lists/bannedsitelist.default /etc/e2guardian/lists/bannedsitelist && echo -n "8"
|
115 |
}
|
115 |
}
|
116 |
|
116 |
|
117 |
antivirus ()
|
117 |
antivirus ()
|
118 |
{
|
118 |
{
|
119 |
echo -en "(5) : "
|
119 |
echo -en "(5) : "
|
Line 283... |
Line 283... |
283 |
if [ $mode == "full" ]
|
283 |
if [ $mode == "full" ]
|
284 |
then
|
284 |
then
|
285 |
echo "----------------------------------------------------------------------------"
|
285 |
echo "----------------------------------------------------------------------------"
|
286 |
echo "** Uninstall/Désinstallation d'ALCASAR **"
|
286 |
echo "** Uninstall/Désinstallation d'ALCASAR **"
|
287 |
echo "----------------------------------------------------------------------------"
|
287 |
echo "----------------------------------------------------------------------------"
|
288 |
services="alcasar-load_balancing vnstat havp freshclam ntpd lighttpd radiusd mysqld dnsmasq-blacklist dnsmasq-whitelist dnsmasq-blackhole tinyproxy nfsen fail2ban iptables ulogd-ext-access ulogd-ssh ulogd-traceability dansguardian dnsmasq sshd chilli"
|
288 |
services="alcasar-load_balancing vnstat havp freshclam ntpd lighttpd radiusd mysqld dnsmasq-blacklist dnsmasq-whitelist dnsmasq-blackhole tinyproxy nfsen fail2ban iptables ulogd-ext-access ulogd-ssh ulogd-traceability e2guardian dnsmasq sshd chilli"
|
289 |
/usr/local/bin/alcasar-logout.sh all # logout everybody
|
289 |
/usr/local/bin/alcasar-logout.sh all # logout everybody
|
290 |
else
|
290 |
else
|
291 |
echo "--------------------------------------------------------------------------"
|
291 |
echo "--------------------------------------------------------------------------"
|
292 |
echo "** update/mise à jour d'ALCASAR **"
|
292 |
echo "** update/mise à jour d'ALCASAR **"
|
293 |
echo "--------------------------------------------------------------------------"
|
293 |
echo "--------------------------------------------------------------------------"
|
294 |
# dnsmasq & sshd should stay on to allow remote update
|
294 |
# dnsmasq & sshd should stay on to allow remote update
|
295 |
services="alcasar-load_balancing vnstat havp freshclam ntpd lighttpd radiusd mysqld dnsmasq-blacklist dnsmasq-whitelist dnsmasq-blackhole tinyproxy nfsen fail2ban ulogd-ext-access ulogd-ssh ulogd-traceability dansguardian chilli"
|
295 |
services="alcasar-load_balancing vnstat havp freshclam ntpd lighttpd radiusd mysqld dnsmasq-blacklist dnsmasq-whitelist dnsmasq-blackhole tinyproxy nfsen fail2ban ulogd-ext-access ulogd-ssh ulogd-traceability e2guardian chilli"
|
296 |
/usr/local/bin/alcasar-bypass.sh -on # to allow remote update
|
296 |
/usr/local/bin/alcasar-bypass.sh -on # to allow remote update
|
297 |
fi
|
297 |
fi
|
298 |
|
298 |
|
299 |
[ -e /lib/systemd/system/httpd.service ] && services+=" httpd"
|
299 |
[ -e /lib/systemd/system/httpd.service ] && services+=" httpd"
|
300 |
|
300 |
|
Line 324... |
Line 324... |
324 |
if [ $mode == "update" ] # reload sshd in case of remote update
|
324 |
if [ $mode == "update" ] # reload sshd in case of remote update
|
325 |
then
|
325 |
then
|
326 |
/usr/bin/systemctl reload sshd
|
326 |
/usr/bin/systemctl reload sshd
|
327 |
fi
|
327 |
fi
|
328 |
echo "Reset ALCASAR main functions : "
|
328 |
echo "Reset ALCASAR main functions : "
|
329 |
for func in init ACC CA time_server init_db freeradius chilli dansguardian antivirus tinyproxy ulogd nfsen vnstat dnsmasq cron fail2ban gammu_smsd msec letsencrypt post_install
|
329 |
for func in init ACC CA time_server init_db freeradius chilli e2guardian antivirus tinyproxy ulogd nfsen vnstat dnsmasq cron fail2ban gammu_smsd msec letsencrypt post_install
|
330 |
do
|
330 |
do
|
331 |
echo -en "\n- $func "
|
331 |
echo -en "\n- $func "
|
332 |
$func
|
332 |
$func
|
333 |
sleep 1
|
333 |
sleep 1
|
334 |
if [ $DEBUG_ALCASAR == "on" ]
|
334 |
if [ $DEBUG_ALCASAR == "on" ]
|