summaryrefslogtreecommitdiffstats
path: root/server/bin/comparedhcpopengnsys
diff options
context:
space:
mode:
authorRoberto Hueso Gómez <rhueso@soleta.eu>2020-10-19 13:38:11 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-10-22 12:50:37 +0200
commit4972d15ecd21a6f8dfe6f8451d19ac678fa2865b (patch)
tree9cf270d2e9c9522a0f4590864082c14f96999a63 /server/bin/comparedhcpopengnsys
parenta0dd47a79ca4d5a06979fe22827bf7d4ea178fb7 (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 'server/bin/comparedhcpopengnsys')
-rwxr-xr-xserver/bin/comparedhcpopengnsys4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/bin/comparedhcpopengnsys b/server/bin/comparedhcpopengnsys
index b4743e42..64ccfbdc 100755
--- a/server/bin/comparedhcpopengnsys
+++ b/server/bin/comparedhcpopengnsys
@@ -16,7 +16,7 @@
PROG="$(basename "$0")"
OPENGNSYS=${OPENGNSYS:-"/opt/opengnsys"}
-SERVERCONF=$OPENGNSYS/etc/ogserver.cfg
+SERVERCONF=$OPENGNSYS/etc/ogserver.json
DHCPFILE=${DHCPFILE:-/etc/dhcp/dhcpd.conf}
TMP_DHCP=/tmp/$PROG-dhcp$$
TMP_MYSQL=/tmp/$PROG-mysql$$
@@ -29,7 +29,7 @@ source $OPENGNSYS/lib/ogfunctions.sh || exit 1
[ -r $DHCPFILE ] || raiseError access "No tenemos acceso al fichero de configuracion del dhcp"
# Obtener datos de acceso a la Base de datos.
-source $SERVERCONF 2> /dev/null || raiseError access "Fichero de configuración del servidor"
+source_json_config $SERVERCONF 2> /dev/null || raiseError access "Fichero de configuración del servidor"
trap "rm -f $TMP_DHCP $TMP_MYSQL" 1 2 3 9 15
# Genero fichero temporal de dhcp recorriendo la configuración del dhcp cadena a cadena.