From 395c326d75c3aa7ee15de2258bf49fa373983e1c Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Tue, 1 Feb 2022 10:21:41 +0100 Subject: #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) --- client/shared/etc/init/default.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/shared/etc/init/default.sh b/client/shared/etc/init/default.sh index e062a306..9022c374 100755 --- a/client/shared/etc/init/default.sh +++ b/client/shared/etc/init/default.sh @@ -19,7 +19,12 @@ echo "${MSG_LAUNCHCLIENT:-.}" [ -f /usr/local/etc/${LANG%_*}.qmap ] && export QWS_KEYBOARD="TTY:keymap=/usr/local/etc/${LANG%_*}.qmap" if [ "$ogstatus" != "offline" ]; then - /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 -- cgit v1.2.3-18-g5258