Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar.sh 1979 2016-07-07 15:27:32Z richard $
|
2 |
# $Id: alcasar.sh 1980 2016-07-07 16:08:49Z 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 933... |
Line 933... |
933 |
{
|
933 |
{
|
934 |
rm -rf /var/lib/mysql # to be sure that there is no former installation
|
934 |
rm -rf /var/lib/mysql # to be sure that there is no former installation
|
935 |
[ -e /etc/my.cnf.default ] || cp /etc/my.cnf /etc/my.cnf.default
|
935 |
[ -e /etc/my.cnf.default ] || cp /etc/my.cnf /etc/my.cnf.default
|
936 |
$SED "s?^tmpdir.*?tmpdir=/tmp?g" /etc/my.cnf
|
936 |
$SED "s?^tmpdir.*?tmpdir=/tmp?g" /etc/my.cnf
|
937 |
$SED "s?^port.*?#&?g" /etc/my.cnf # we use unix socket only
|
937 |
$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
|
- |
|
939 |
$SED "s?^;character_set_server =.*?character_set_server = utf8?g" /etc/my.cnf # accentuated user names are allowed
|
938 |
$SED "s?^plugin-load.*?#&?g" /etc/my.cnf.s/feedback.cnf # remove the feedback plugin (ALCASAR doesn't report anything !)
|
940 |
$SED "s?^plugin-load.*?#&?g" /etc/my.cnf.d/feedback.cnf # remove the feedback plugin (ALCASAR doesn't report anything !)
|
939 |
/usr/bin/systemctl start mysqld.service
|
941 |
/usr/bin/systemctl start mysqld.service
|
940 |
nb_round=1
|
942 |
nb_round=1
|
941 |
while [ ! -f /var/run/mysqld/mysqld.pid ] && [ $nb_round -ne 10 ] # we wait until mariadb is on
|
943 |
while [ ! -f /var/lib/mysql/mysql.sock ] && [ $nb_round -ne 10 ] # we wait until mariadb is on
|
942 |
do
|
944 |
do
|
943 |
nb_round=`expr $nb_round + 1`
|
945 |
nb_round=`expr $nb_round + 1`
|
944 |
sleep 2
|
946 |
sleep 2
|
945 |
done
|
947 |
done
|
946 |
if [ ! -f /var/run/mysqld/mysqld.pid ]
|
948 |
if [ ! -f /var/lib/mysql/mysql.sock ]
|
947 |
then
|
949 |
then
|
948 |
echo "Problème : la base donnée ne s'est pas lancée ! "
|
950 |
echo "Problème : la base donnée ne s'est pas lancée ! "
|
949 |
exit
|
951 |
exit
|
950 |
fi
|
952 |
fi
|
951 |
mysqladmin -u root password $mysqlpwd
|
953 |
mysqladmin -u root password $mysqlpwd
|