Subversion Repositories ALCASAR

Rev

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

Rev 3298 Rev 3309
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 3298 2025-09-07 22:33:37Z rexy $
2
#  $Id: alcasar.sh 3309 2026-01-04 00:29:23Z rexy $
3
 
3
 
4
# ALCASAR is a Free and open source NAC (Network Access Controler) created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
4
# ALCASAR is a Free and open source NAC (Network Access Controler) created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
5
# ALCASAR is based on a stripped Mageia (LSB) with the following open source softwares Coovachilli, freeradius, mariaDB, apache, php, netfilter, e2guardian, ntpd, openssl, unbound, gammu, Ulog, fail2ban, vnstat, wkhtml2pdf, ipt_NETFLOW, NFsen and NFdump
5
# ALCASAR is based on a stripped Mageia (LSB) with the following open source softwares Coovachilli, freeradius, mariaDB, apache, php, netfilter, e2guardian, ntpd, openssl, unbound, gammu, Ulog, fail2ban, vnstat, wkhtml2pdf, ipt_NETFLOW, NFsen and NFdump
6
# contact : info@alcasar.net
6
# contact : info@alcasar.net
7
 
7
 
Line 1088... Line 1088...
1088
	$SED "s?^port.*?#&?g" /etc/my.cnf # we use unix socket only
1088
	$SED "s?^port.*?#&?g" /etc/my.cnf # we use unix socket only
1089
	[ -e /etc/my.cnf.d/server.cnf.default ] || cp /etc/my.cnf.d/server.cnf /etc/my.cnf.d/server.cnf.default
1089
	[ -e /etc/my.cnf.d/server.cnf.default ] || cp /etc/my.cnf.d/server.cnf /etc/my.cnf.d/server.cnf.default
1090
	$SED "s?^tmpdir.*?tmpdir=/tmp?g" /etc/my.cnf.d/server.cnf
1090
	$SED "s?^tmpdir.*?tmpdir=/tmp?g" /etc/my.cnf.d/server.cnf
1091
	$SED "s?^;collation_server =.*?collation_server = utf8_unicode_ci?g" /etc/my.cnf.d/server.cnf
1091
	$SED "s?^;collation_server =.*?collation_server = utf8_unicode_ci?g" /etc/my.cnf.d/server.cnf
1092
	$SED "s?^;character_set_server =.*?character_set_server = utf8?g" /etc/my.cnf.d/server.cnf  # accentuated user names are allowed
1092
	$SED "s?^;character_set_server =.*?character_set_server = utf8?g" /etc/my.cnf.d/server.cnf  # accentuated user names are allowed
-
 
1093
	SRV_ID=`cat /dev/urandom | tr -dc "0-9" | head -c 9` # SRV_ID must be < 2^32 -1
-
 
1094
	$SED "s?^server-id.*?server-id=$SRV_ID?g" /etc/my.cnf.d/server.cnf # Be sure not to have same server_id (need for replication architecture)
1093
	# Create our own systemd unit
1095
	# Create our own systemd unit
1094
	cp /lib/systemd/system/mysqld.service /etc/systemd/system/mariadb.service
1096
	cp /lib/systemd/system/mysqld.service /etc/systemd/system/mariadb.service
1095
	$SED "s?^ExecStart=.*?ExecStart=/usr/sbin/mariadbd?g" /etc/systemd/system/mariadb.service
1097
	$SED "s?^ExecStart=.*?ExecStart=/usr/sbin/mariadbd?g" /etc/systemd/system/mariadb.service
1096
	/usr/bin/systemctl set-environment MYSQLD_OPTS="--skip-grant-tables --skip-networking"
1098
	/usr/bin/systemctl set-environment MYSQLD_OPTS="--skip-grant-tables --skip-networking"
1097
	[ ! -e /usr/bin/mariadb_install_db ] && ln -s /usr/bin/mariadb-install-db /usr/bin/mariadb_install_db # avoid Mageia bug (https://bugs.mageia.org/show_bug.cgi?id=34200)
1099
	[ ! -e /usr/bin/mariadb_install_db ] && ln -s /usr/bin/mariadb-install-db /usr/bin/mariadb_install_db # avoid Mageia bug (https://bugs.mageia.org/show_bug.cgi?id=34200)