parent
b825088da8
commit
570668f9ab
|
@ -18,20 +18,20 @@ echo "${MSG_LAUNCHCLIENT:-.}"
|
||||||
# Indicar fichero de teclado de Qt para el idioma especificado (tipo "es.qmap").
|
# Indicar fichero de teclado de Qt para el idioma especificado (tipo "es.qmap").
|
||||||
[ -f /usr/local/etc/${LANG%_*}.qmap ] && export QWS_KEYBOARD="TTY:keymap=/usr/local/etc/${LANG%_*}.qmap"
|
[ -f /usr/local/etc/${LANG%_*}.qmap ] && export QWS_KEYBOARD="TTY:keymap=/usr/local/etc/${LANG%_*}.qmap"
|
||||||
|
|
||||||
if [ -x "$OPENGNSYS/bin/ogAdmClient" -a "$ogstatus" != "offline" ]; then
|
if [ -f "/usr/share/OGAgent/opengnsys/linux/OGAgentService.py" -a "$ogstatus" != "offline" ]; then
|
||||||
# Ejecutar servicio cliente.
|
# Ejecutar servicio cliente.
|
||||||
$OPENGNSYS/bin/ogAdmClient -f $OPENGNSYS/etc/ogAdmClient.cfg -l $OGLOGFILE -d $LOGLEVEL
|
cd /usr/share/OGAgent
|
||||||
|
sed -i -e "/remote=/ s/https:/http:/; /remote=/ s%192.168.[^/]*/%${ogcore}:8000/%" cfg/ogagent.cfg
|
||||||
|
python3 -m opengnsys.linux.OGAgentService fg
|
||||||
else
|
else
|
||||||
for FILE in index $OGGROUP $(ogGetIpAddress)
|
for FILE in index $OGGROUP $(ogGetIpAddress)
|
||||||
do
|
do
|
||||||
[ -f $OGCAC/menus/$FILE.html ] && OGMENU="$OGCAC/menus/$FILE.html"
|
[ -f $OGCAC/menus/$FILE.html ] && OGMENU="$OGCAC/menus/$FILE.html"
|
||||||
done
|
done
|
||||||
$OPENGNSYS/bin/browser -qws $OGMENU
|
/usr/bin/OGBrowser -qws $OGMENU
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Si fallo en cliente y modo "admin", cargar shell; si no, salir.
|
# Si fallo en cliente y modo "admin", cargar shell; si no, salir.
|
||||||
if [ "$ogactiveadmin" == "true" ]; then
|
if [ "$ogactiveadmin" == "true" ]; then
|
||||||
bash
|
bash
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -464,6 +464,8 @@ def copyClientFiles():
|
||||||
config_file.write(content)
|
config_file.write(content)
|
||||||
|
|
||||||
logger.info("Configuration file ogAdmClient.cfg created successfully.")
|
logger.info("Configuration file ogAdmClient.cfg created successfully.")
|
||||||
|
# Change ownership of INSTALL_OGBOOT_TARGET/client/ and its contents
|
||||||
|
subprocess.run(f"chown -R opengnsys:opengnsys {INSTALL_OGBOOT_TARGET}/client/", shell=True, text=True, capture_output=True)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Error creating ogAdmClient.cfg: {e}")
|
logger.error(f"Error creating ogAdmClient.cfg: {e}")
|
||||||
|
@ -476,6 +478,7 @@ def copyClientFiles():
|
||||||
return not errstatus
|
return not errstatus
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def get_first_network_interface_with_traffic():
|
def get_first_network_interface_with_traffic():
|
||||||
with open('/proc/net/dev') as f:
|
with open('/proc/net/dev') as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
|
|
Loading…
Reference in New Issue