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_update.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_update.sh')
-rwxr-xr-x | installer/opengnsys_update.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index bd689008..11c64a8e 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -52,8 +52,13 @@ if [ ! -d $INSTALL_TARGET ]; then echo "ERROR: OpenGnsys is not installed, cannot update!!" exit 1 fi + +source $INSTALL_TARGET/lib/ogfunctions.sh || exit 1 + # Cargar configuración de acceso a la base de datos. -if [ -r $INSTALL_TARGET/etc/ogserver.cfg ]; then +if [ -r $INSTALL_TARGET/etc/ogserver.json ]; then + source_json_config $INSTALL_TARGET/etc/ogserver.json +elif [ -r $INSTALL_TARGET/etc/ogserver.cfg ]; then source $INSTALL_TARGET/etc/ogserver.cfg elif [ -r $INSTALL_TARGET/etc/ogAdmServer.cfg ]; then source $INSTALL_TARGET/etc/ogAdmServer.cfg |