Subversion Repositories ALCASAR

Rev

Rev 3243 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 3243 Rev 3248
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-uninstall.sh 3243 2025-01-19 17:33:09Z rexy $
2
# $Id: alcasar-uninstall.sh 3248 2025-02-08 14:09:43Z 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 148... Line 148...
148
}
148
}
149
 
149
 
150
nfsen ()
150
nfsen ()
151
{
151
{
152
	# we don't remove user "nfcapd" & nfcapd folders in order to keep data when updating
152
	# we don't remove user "nfcapd" & nfcapd folders in order to keep data when updating
153
	echo -en "(1) : "
153
	echo -en "(2) : "
154
	[ -e /etc/systemd/system/nfcapd.service ] && rm -f /etc/systemd/system/nfcapd.service && echo -n "1"
154
	[ -e /etc/systemd/system/nfcapd.service ] && rm -f /etc/systemd/system/nfcapd.service && echo -n "1"
-
 
155
	[ -e /etc/systemd/system/nfsen-ng.service ] && rm -f /etc/systemd/system/nfsen-ng.service && echo -n "2"
155
}
156
}
156
 
157
 
157
vnstat ()
158
vnstat ()
158
{
159
{
159
	echo -en "(2) : "
160
	echo -en "(2) : "
Line 305... Line 306...
305
clear
306
clear
306
if [ $mode == "full" ]; then
307
if [ $mode == "full" ]; then
307
	echo "----------------------------------------------------------------------------"
308
	echo "----------------------------------------------------------------------------"
308
	echo "**                     Uninstall/Désinstallation d'ALCASAR		**"
309
	echo "**                     Uninstall/Désinstallation d'ALCASAR		**"
309
	echo "----------------------------------------------------------------------------"
310
	echo "----------------------------------------------------------------------------"
310
	services="vnstat clamav-daemon clamav-freshclam ntpd httpd radiusd mysqld unbound unbound-blacklist unbound-whitelist unbound-blackhole nfcapd fail2ban iptables ulogd-ext-access ulogd-ssh ulogd-traceability e2guardian sshd chilli"
311
	services="vnstat clamav-daemon clamav-freshclam ntpd httpd radiusd mysqld unbound unbound-blacklist unbound-whitelist unbound-blackhole nfcapd nfsen-ng fail2ban iptables ulogd-ext-access ulogd-ssh ulogd-traceability e2guardian sshd chilli"
311
	/usr/local/bin/alcasar-logout.sh all # logout everybody
312
	/usr/local/bin/alcasar-logout.sh all # logout everybody
312
else
313
else
313
	echo "--------------------------------------------------------------------------"
314
	echo "--------------------------------------------------------------------------"
314
	echo "**                     update/mise à jour d'ALCASAR			**"
315
	echo "**                     update/mise à jour d'ALCASAR			**"
315
	echo "--------------------------------------------------------------------------"
316
	echo "--------------------------------------------------------------------------"
316
	# unbound, iptables & sshd should stay on to allow remote update
317
	# unbound, iptables & sshd should stay on to allow remote update
317
	services="vnstat clamav-daemon clamav-freshclam ntpd httpd radiusd mysqld unbound-blacklist unbound-whitelist unbound-blackhole nfcapd fail2ban ulogd-ext-access ulogd-ssh ulogd-traceability e2guardian chilli"
318
	services="vnstat clamav-daemon clamav-freshclam ntpd httpd radiusd mysqld unbound-blacklist unbound-whitelist unbound-blackhole nfcapd nfsen-ng fail2ban ulogd-ext-access ulogd-ssh ulogd-traceability e2guardian chilli"
318
	/usr/local/bin/alcasar-bypass.sh -on # to allow remote update + users stay connected during the update
319
	/usr/local/bin/alcasar-bypass.sh -on # to allow remote update + users stay connected during the update
319
fi
320
fi
320
 
321
 
321
echo "Stopping services : "
322
echo "Stopping services : "
322
# remove daemon watchdog in order to not restart alcasar daemons during the uninstall process
323
# remove daemon watchdog in order to not restart alcasar daemons during the uninstall process