source: client/shared/etc/init/default.sh @ 2fae617b

webconsole3
Last change on this file since 2fae617b was 6240405, checked in by jm.bardallo <juanmanuel.bardallo@…>, 7 years ago

Version inicial de la consola web 3.0, de momento funcionará paralelamente a la consola web antigua

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