summaryrefslogtreecommitdiffstats
path: root/client/shared/etc/init/default.sh
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2022-02-01 10:21:41 +0100
committerJose M. Guisado <jguisado@soleta.eu>2022-02-01 12:17:05 +0100
commit5205a1a4422481166470d7a5d9151f73a46bd608 (patch)
tree26b3d9b726f47e649b2300e9a092fcef134c4e02 /client/shared/etc/init/default.sh
parent99b29a1a153fbdfb552ddadafc610fb0a741dff3 (diff)
#1068 Detect room specific client config file
Before starting ogClient, script will lookup for specific classroom configuration file, if it is found, then it will use it, otherwise it uses the default configuration file. The specific configuration file allows for finer-grain configurations per room. Spaces in the room name are replaced by underscore. For example. client: pc11, room name: "Virtual room". If "Virtual_room.json" exists in client /opt/opengnsys/ogClient/cfg it will use that config file. If it doesn't exist, start ogclient with default config file (ogclient.json)
Diffstat (limited to 'client/shared/etc/init/default.sh')
-rwxr-xr-xclient/shared/etc/init/default.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/client/shared/etc/init/default.sh b/client/shared/etc/init/default.sh
index 18ae37c5..109eccd3 100755
--- a/client/shared/etc/init/default.sh
+++ b/client/shared/etc/init/default.sh
@@ -22,7 +22,12 @@ if [ "$ogstatus" != "offline" ]; then
if ogFindCache &>/dev/null; then
/opt/opengnsys/bin/tiptorrent --root /opt/opengnsys/cache/opt/opengnsys/images -n 3 &
fi
- /opt/opengnsys/ogClient/./ogclient
+ GROUP_CONFIG=/opt/opengnsys/ogClient/cfg/${group/ /_}.json
+ if [ -f $GROUP_CONFIG ]; then
+ /opt/opengnsys/ogClient/./ogclient -c $GROUP_CONFIG
+ else
+ /opt/opengnsys/ogClient/./ogclient
+ fi
else
for FILE in index $OGGROUP $(ogGetIpAddress)
do