Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar.sh 1981 2016-07-08 07:44:30Z richard $
|
2 |
# $Id: alcasar.sh 1990 2016-07-14 17:34:45Z richard $
|
3 |
|
3 |
|
4 |
# alcasar.sh
|
4 |
# alcasar.sh
|
5 |
|
5 |
|
6 |
# ALCASAR Install script - CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...]
|
6 |
# ALCASAR Install script - CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...]
|
7 |
# Ce programme est un logiciel libre ; This software is free and open source
|
7 |
# Ce programme est un logiciel libre ; This software is free and open source
|
Line 929... |
Line 929... |
929 |
## - Import des tables de comptabilité (mtotacct, totacct) et info_usagers (userinfo) ##
|
929 |
## - Import des tables de comptabilité (mtotacct, totacct) et info_usagers (userinfo) ##
|
930 |
## ces table proviennent de 'dialupadmin' (paquetage freeradius-web) ##
|
930 |
## ces table proviennent de 'dialupadmin' (paquetage freeradius-web) ##
|
931 |
##########################################################################################
|
931 |
##########################################################################################
|
932 |
init_db ()
|
932 |
init_db ()
|
933 |
{
|
933 |
{
|
- |
|
934 |
if [ `systemctl is-active mysqld` == "active" ]
|
- |
|
935 |
then
|
- |
|
936 |
systemctl stop mysqld
|
- |
|
937 |
fi
|
934 |
rm -rf /var/lib/mysql # to be sure that there is no former installation
|
938 |
rm -rf /var/lib/mysql # to be sure that there is no former installation
|
- |
|
939 |
/usr/sbin/mysql-prepare-db-dir
|
935 |
[ -e /etc/my.cnf.default ] || cp /etc/my.cnf /etc/my.cnf.default
|
940 |
[ -e /etc/my.cnf.default ] || cp /etc/my.cnf /etc/my.cnf.default
|
936 |
$SED "s?^tmpdir.*?tmpdir=/tmp?g" /etc/my.cnf
|
941 |
$SED "s?^tmpdir.*?tmpdir=/tmp?g" /etc/my.cnf
|
937 |
$SED "s?^port.*?#&?g" /etc/my.cnf # we use unix socket only
|
942 |
$SED "s?^port.*?#&?g" /etc/my.cnf # we use unix socket only
|
938 |
$SED "s?^;collation_server =.*?collation_server = utf8_unicode_ci?g" /etc/my.cnf
|
943 |
$SED "s?^;collation_server =.*?collation_server = utf8_unicode_ci?g" /etc/my.cnf
|
939 |
$SED "s?^;character_set_server =.*?character_set_server = utf8?g" /etc/my.cnf # accentuated user names are allowed
|
944 |
$SED "s?^;character_set_server =.*?character_set_server = utf8?g" /etc/my.cnf # accentuated user names are allowed
|