Skip to content
Snippets Groups Projects
Commit 3b46c511 authored by sebastien curt's avatar sebastien curt
Browse files

InstallMySQL.sh :

- read env file to set root password manually if required

Run.sh :
- support TetrasBack install
parent 0b6f992f
No related branches found
No related tags found
No related merge requests found
# MYSQL_ROOT_PASSWORD="password"
......@@ -18,13 +18,10 @@
set -o nounset # Treat unset variables as an error
###########################################################################
# 1. Install MySql
# 2. Save root password to file /root/.my.cnf
# 3. Configure MySql with mysql_secure_installation
# 4. Start mysql service
###########################################################################
if [ -f installMySQL.env ]
then
. `pwd`/installMySQL.env
fi
# If mysql not installed then install it
DEBIAN_FRONTEND='noninteractive' apt-get -qq install mysql-server \
......@@ -102,6 +99,6 @@ rm -v ${configureMySQLFile} # Remove the generated Expect script
unset configureMySQLFile
unset MYSQL_ROOT_PASSWORD
echo "MySQL setup completed. Insecure defaults are gone. Please remove"
echo " this script manually when you are done with it (or at least "
echo "remove the MySQL root password that you put inside it."
echo "MySQL setup completed. Insecure defaults are gone. Please remove" \
"this script manually when you are done with it (or at least " \
"remove the MySQL root password that you put inside it."
#!/bin/bash -
#
# Copyright (C) 2017 Tetras Libre <admin@tetras-libre.fr>
# Author: Curt, Sebastien <sebastien.curt@tetras-libre.fr>
#
# This program is free software: you can redistribute it and/or modify # it
# under the terms of the GNU General Public License as published by # the Free
# Software Foundation, either version 3 of the License, or # (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, # but WITHOUT
# ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License # along
# with this program. If not, see <http://www.gnu.org/licenses/>.
set -o nounset # Treat unset variables as an error
DEBIAN_FRONTEND="noninteractive" apt-get install git gnulib perl sendmail udev \
systemd
OriginalDirectory=`pwd`
git clone https://gitlab.tetras-libre.fr/tetras-libre/Tetras-back.git
cd Tetras-back
make dependencies
make
make config
cd OriginalDirectory
......@@ -37,3 +37,8 @@ if [ -f installDolibarr.sh ]
then
. `pwd`/installDolibarr.sh
fi
if [ -f installTetrasBack.sh ]
then
. `pwd`/installTetrasBack.sh
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment