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). |
---|
5 | OPENGNSYS=${OPENGNSYS:-/opt/opengnsys} |
---|
6 | OGLOGFILE=${OGLOGFILE:-$OPENGNSYS/log/$(ogGetIpAddress).log} |
---|
7 | if ! touch $OGLOGFILE 2>/dev/null; then |
---|
8 | OGLOGFILE=/var/log/opengnsys.log |
---|
9 | fi |
---|
10 | LOGLEVEL=5 |
---|
11 | |
---|
12 | # TODO - PRUEBA |
---|
13 | AGENT_FILE="/var/tmp/ogAdmClient" |
---|
14 | touch $AGENT_FILE |
---|
15 | chmod a+wxs $AGENT_FILE |
---|
16 | chown root:root $AGENT_FILE |
---|
17 | # Exportar funciones para comunicacion con el servidor |
---|
18 | sendConfigToServer |
---|
19 | sendStatusToServer "initializing" |
---|
20 | |
---|
21 | # Matando plymount para inicir browser o shell |
---|
22 | pkill -9 plymouthd |
---|
23 | |
---|
24 | # Arranque de OpenGnsys Client daemon (socket). |
---|
25 | echo "${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 | |
---|
29 | if [ -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 |
---|
32 | else |
---|
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 |
---|
38 | fi |
---|
39 | |
---|
40 | # Si fallo en cliente y modo "admin", cargar shell; si no, salir. |
---|
41 | if [ "$ogactiveadmin" == "true" ]; then |
---|
42 | bash |
---|
43 | fi |
---|
44 | |
---|
Note: See
TracBrowser
for help on using the repository browser.