Subversion Repositories ALCASAR

Rev

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

Rev 3252 Rev 3269
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-uninstall.sh 3252 2025-02-21 18:40:30Z rexy $
2
# $Id: alcasar-uninstall.sh 3269 2025-04-21 21:57:13Z 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 60... Line 60...
60
	if [ -e /etc/systemd/system/mysqld.service ]
60
	if [ -e /etc/systemd/system/mysqld.service ]
61
	then
61
	then
62
		rm /etc/systemd/system/mysqld.service
62
		rm /etc/systemd/system/mysqld.service
63
		echo -n "2"
63
		echo -n "2"
64
	fi
64
	fi
-
 
65
	if [ -e /etc/systemd/system/mariadb.service ]
-
 
66
	then
-
 
67
		rm /etc/systemd/system/mariadb.service
-
 
68
		echo -n "2"
-
 
69
	fi
65
	/usr/bin/systemctl daemon-reload
70
	/usr/bin/systemctl daemon-reload
66
	rm -rf /var/lib/mysql
71
	rm -rf /var/lib/mysql
67
}
72
}
68
 
73
 
69
freeradius ()
74
freeradius ()
Line 307... Line 312...
307
clear
312
clear
308
if [ $mode == "full" ]; then
313
if [ $mode == "full" ]; then
309
	echo "----------------------------------------------------------------------------"
314
	echo "----------------------------------------------------------------------------"
310
	echo "**                     Uninstall/Désinstallation d'ALCASAR		**"
315
	echo "**                     Uninstall/Désinstallation d'ALCASAR		**"
311
	echo "----------------------------------------------------------------------------"
316
	echo "----------------------------------------------------------------------------"
312
	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"
317
	services="vnstat clamav-daemon clamav-freshclam ntpd httpd radiusd mariadb unbound unbound-blacklist unbound-whitelist unbound-blackhole nfcapd nfsen-ng fail2ban iptables ulogd-ext-access ulogd-ssh ulogd-traceability e2guardian sshd chilli"
313
	/usr/local/bin/alcasar-logout.sh all # logout everybody
318
	/usr/local/bin/alcasar-logout.sh all # logout everybody
314
else
319
else
315
	echo "--------------------------------------------------------------------------"
320
	echo "--------------------------------------------------------------------------"
316
	echo "**                     update/mise à jour d'ALCASAR			**"
321
	echo "**                     update/mise à jour d'ALCASAR			**"
317
	echo "--------------------------------------------------------------------------"
322
	echo "--------------------------------------------------------------------------"
318
	# unbound, iptables & sshd should stay on to allow remote update
323
	# unbound, iptables & sshd should stay on to allow remote update
319
	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"
324
	services="vnstat clamav-daemon clamav-freshclam ntpd httpd radiusd mariadb unbound-blacklist unbound-whitelist unbound-blackhole nfcapd nfsen-ng fail2ban ulogd-ext-access ulogd-ssh ulogd-traceability e2guardian chilli"
320
	/usr/local/bin/alcasar-bypass.sh -on # to allow remote update + users stay connected during the update
325
	/usr/local/bin/alcasar-bypass.sh -on # to allow remote update + users stay connected during the update
321
fi
326
fi
322
 
327
 
323
echo "Stopping services : "
328
echo "Stopping services : "
324
# remove daemon watchdog in order to not restart alcasar daemons during the uninstall process
329
# remove daemon watchdog in order to not restart alcasar daemons during the uninstall process