diff --git a/installMySQL.env b/installMySQL.env new file mode 100644 index 0000000000000000000000000000000000000000..4b64135f683198d67ba41a71948ca4703fdaf44c --- /dev/null +++ b/installMySQL.env @@ -0,0 +1 @@ +# MYSQL_ROOT_PASSWORD="password" diff --git a/installMySQL.sh b/installMySQL.sh index 484eebd4d0504fe7adb66a4c281aaa12b4434258..a60cfeee1c5863de6e45b90c8ff990c880af74e3 100644 --- a/installMySQL.sh +++ b/installMySQL.sh @@ -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." diff --git a/installTetrasBack.sh b/installTetrasBack.sh new file mode 100644 index 0000000000000000000000000000000000000000..a7d8217616c96da77dd3d76eab184b2d5643b2ed --- /dev/null +++ b/installTetrasBack.sh @@ -0,0 +1,32 @@ +#!/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 diff --git a/run.sh b/run.sh index 05cb9bc9ecb8c8175f933f0576db20db1ca9ed22..c921d62c6473521c6c16e51dfae5910381525b49 100644 --- a/run.sh +++ b/run.sh @@ -37,3 +37,8 @@ if [ -f installDolibarr.sh ] then . `pwd`/installDolibarr.sh fi + +if [ -f installTetrasBack.sh ] +then + . `pwd`/installTetrasBack.sh +fi