diff options
author | Jose M. Guisado <jguisado@soleta.eu> | 2023-08-28 12:46:07 +0200 |
---|---|---|
committer | Jose M. Guisado <jguisado@soleta.eu> | 2023-08-28 16:07:49 +0200 |
commit | 56256e8468d61000c76f65a967b7b556db3742de (patch) | |
tree | 115048e4edaaf6a617a079658d12c15428e8c702 /client | |
parent | 9eb874680d9e78f0997f0249fb74d147f4d20752 (diff) |
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.
Diffstat (limited to 'client')
-rwxr-xr-x | client/shared/etc/init/default.sh | 5 |
1 files changed, 4 insertions, 1 deletions
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 |