Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar.sh 2589 2018-08-14 21:15:56Z rexy $
|
2 |
# $Id: alcasar.sh 2591 2018-08-17 15:43:41Z rexy $
|
3 |
|
3 |
|
4 |
# alcasar.sh
|
4 |
# alcasar.sh
|
5 |
# ALCASAR is a Free and open source NAC created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
|
5 |
# ALCASAR is a Free and open source NAC created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
|
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 |
# team@alcasar.net
|
7 |
# team@alcasar.net
|
Line 877... |
Line 877... |
877 |
[ -e /etc/my.cnf.default ] || cp /etc/my.cnf /etc/my.cnf.default
|
877 |
[ -e /etc/my.cnf.default ] || cp /etc/my.cnf /etc/my.cnf.default
|
878 |
$SED "s?^tmpdir.*?tmpdir=/tmp?g" /etc/my.cnf
|
878 |
$SED "s?^tmpdir.*?tmpdir=/tmp?g" /etc/my.cnf
|
879 |
$SED "s?^port.*?#&?g" /etc/my.cnf # we use unix socket only
|
879 |
$SED "s?^port.*?#&?g" /etc/my.cnf # we use unix socket only
|
880 |
$SED "s?^;collation_server =.*?collation_server = utf8_unicode_ci?g" /etc/my.cnf
|
880 |
$SED "s?^;collation_server =.*?collation_server = utf8_unicode_ci?g" /etc/my.cnf
|
881 |
$SED "s?^;character_set_server =.*?character_set_server = utf8?g" /etc/my.cnf # accentuated user names are allowed
|
881 |
$SED "s?^;character_set_server =.*?character_set_server = utf8?g" /etc/my.cnf # accentuated user names are allowed
|
882 |
$SED "s?^plugin-load.*?#&?g" /etc/my.cnf.d/feedback.cnf # remove the feedback plugin (ALCASAR doesn't report anything !)
|
882 |
[ -e /etc/my.cnf.d/feedback.cnf ] && $SED "s?^plugin-load.*?#&?g" /etc/my.cnf.d/feedback.cnf # remove the feedback plugin (ALCASAR doesn't report anything !)
|
883 |
/usr/sbin/mysqld-prepare-db-dir > /dev/null 2>&1
|
883 |
/usr/sbin/mysqld-prepare-db-dir > /dev/null 2>&1
|
884 |
/usr/bin/systemctl set-environment MYSQLD_OPTS="--skip-grant-tables --skip-networking"
|
884 |
/usr/bin/systemctl set-environment MYSQLD_OPTS="--skip-grant-tables --skip-networking"
|
885 |
/usr/bin/systemctl start mysqld
|
885 |
/usr/bin/systemctl start mysqld
|
886 |
nb_round=1
|
886 |
nb_round=1
|
887 |
while [ ! -S /var/lib/mysql/mysql.sock ] && [ $nb_round -lt 10 ] # we wait until mariadb is on
|
887 |
while [ ! -S /var/lib/mysql/mysql.sock ] && [ $nb_round -lt 10 ] # we wait until mariadb is on
|