source: client/shared/etc/init/default.sh @ 395c326

Last change on this file since 395c326 was 395c326, checked in by OpenGnSys Support Team <soporte-og@…>, 3 years ago

#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)

  • Property mode set to 100755
File size: 1.2 KB
Line 
1#!/bin/bash
2# Proceso general de arranque de OpenGnsys Client.
3
4
5# Fichero de registro de incidencias (en el servidor; si no, en local).
6OPENGNSYS=${OPENGNSYS:-/opt/opengnsys}
7OGLOGFILE=${OGLOGFILE:-$OPENGNSYS/log/$(ogGetIpAdderss).log}
8if ! touch $OGLOGFILE 2>/dev/null; then
9    OGLOGFILE=/var/log/opengnsys.log
10fi
11LOGLEVEL=5
12
13# Matando plymount para inicir browser o shell
14pkill -9 plymouthd
15
16# Arranque de OpenGnsys Client daemon (socket).
17echo "${MSG_LAUNCHCLIENT:-.}"
18# Indicar fichero de teclado de Qt para el idioma especificado (tipo "es.qmap").
19[ -f /usr/local/etc/${LANG%_*}.qmap ] && export QWS_KEYBOARD="TTY:keymap=/usr/local/etc/${LANG%_*}.qmap"
20
21if [ "$ogstatus" != "offline"  ]; then
22    GROUP_CONFIG=/opt/opengnsys/ogClient/cfg/${group/ /_}.json
23    if [ -f $GROUP_CONFIG ]; then
24        /opt/opengnsys/ogClient/./ogclient -c $GROUP_CONFIG
25    else
26        /opt/opengnsys/ogClient/./ogclient
27    fi
28else
29    for FILE in index $OGGROUP $(ogGetIpAddress)
30    do
31        [ -f $OGCAC/menus/$FILE.html ] && OGMENU="$OGCAC/menus/$FILE.html"
32    done
33    $OPENGNSYS/bin/browser -qws $OGMENU
34fi
35
36# Si fallo en cliente y modo "admin", cargar shell; si no, salir.
37if [ "$ogactiveadmin" == "true" ]; then
38    bash
39fi
40
41
Note: See TracBrowser for help on using the repository browser.