From 56256e8468d61000c76f65a967b7b556db3742de Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Mon, 28 Aug 2023 12:46:07 +0200 Subject: search network specific ogclient configuration If server= boot param is present and expands to a valid configuration file at "/opt/opengnsys/ogClient/cfg/$server.json", use this configuration file as the ogClient config file. --- client/shared/etc/init/default.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'client/shared/etc') diff --git a/client/shared/etc/init/default.sh b/client/shared/etc/init/default.sh index fd88bb53..f24548f0 100755 --- a/client/shared/etc/init/default.sh +++ b/client/shared/etc/init/default.sh @@ -22,10 +22,13 @@ if [ "$ogstatus" != "offline" ]; then if ogFindCache &>/dev/null; then /opt/opengnsys/bin/tiptorrent --root /opt/opengnsys/cache/opt/opengnsys/images -n 3 & fi + SERVER_CONFIG="/opt/opengnsys/ogClient/cfg/ogclient-$server.json" GROUP_CONFIG=/opt/opengnsys/ogClient/cfg/${group/ /_}.json PYMAJMIN=`python3 --version | cut -d" " -f2 | cut -d. -f1,2` export PYTHONPATH=/opt/opengnsys/lib/python$PYMAJMIN - if [ -f $GROUP_CONFIG ]; then + if [ -f $SERVER_CONFIG ]; then + /opt/opengnsys/ogClient/./ogclient -c $SERVER_CONFIG + elif [ -f $GROUP_CONFIG ]; then /opt/opengnsys/ogClient/./ogclient -c $GROUP_CONFIG else /opt/opengnsys/ogClient/./ogclient -- cgit v1.2.3-18-g5258