diff options
author | Roberto Hueso Gómez <rhueso@soleta.eu> | 2020-10-19 13:38:11 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2020-10-22 12:50:37 +0200 |
commit | 4972d15ecd21a6f8dfe6f8451d19ac678fa2865b (patch) | |
tree | 9cf270d2e9c9522a0f4590864082c14f96999a63 /installer/opengnsys_import.sh | |
parent | a0dd47a79ca4d5a06979fe22827bf7d4ea178fb7 (diff) |
#988 Read json config file in scripts
This patch implements the function source_json_config() that is used to
read the new ogserver.json config file in the scripts. This replaces the
old 'source .../ogserver.cfg'.
Co-authored-by: Javier Sánchez Parra <jsanchez@soleta.eu>
Diffstat (limited to 'installer/opengnsys_import.sh')
-rwxr-xr-x | installer/opengnsys_import.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/installer/opengnsys_import.sh b/installer/opengnsys_import.sh index 0962e34b..d49c3312 100755 --- a/installer/opengnsys_import.sh +++ b/installer/opengnsys_import.sh @@ -278,7 +278,7 @@ if ! [ -r $BACKUPFILE ]; then fi # Comprobamos acceso a ficheros de configuración -if ! [ -r $OPENGNSYS/etc/ogserver.cfg ]; then +if ! [ -r $OPENGNSYS/etc/ogserver.json ]; then echo "$PROG: ERROR: Sin acceso a la configuración de OpenGnsys." | tee -a $FILESAL exit 3 fi @@ -333,7 +333,8 @@ fi # MYSQL echo " * Importamos informacion mysql." -source $OPENGNSYS/etc/ogserver.cfg +source $OPENGNSYS/lib/ogfunctions.sh || exit 1 +source_json_config $OPENGNSYS/etc/ogserver.json # Crear fichero temporal de acceso a la BD if [ ! -r $MYCNF ]; then chmod 600 $MYCNF |