parent
b825088da8
commit
570668f9ab
|
@ -18,20 +18,20 @@ echo "${MSG_LAUNCHCLIENT:-.}"
|
|||
# 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"
|
||||
|
||||
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.
|
||||
$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
|
||||
for FILE in index $OGGROUP $(ogGetIpAddress)
|
||||
do
|
||||
[ -f $OGCAC/menus/$FILE.html ] && OGMENU="$OGCAC/menus/$FILE.html"
|
||||
done
|
||||
$OPENGNSYS/bin/browser -qws $OGMENU
|
||||
/usr/bin/OGBrowser -qws $OGMENU
|
||||
fi
|
||||
|
||||
# Si fallo en cliente y modo "admin", cargar shell; si no, salir.
|
||||
if [ "$ogactiveadmin" == "true" ]; then
|
||||
bash
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
@ -464,6 +464,8 @@ def copyClientFiles():
|
|||
config_file.write(content)
|
||||
|
||||
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:
|
||||
logger.error(f"Error creating ogAdmClient.cfg: {e}")
|
||||
|
@ -476,6 +478,7 @@ def copyClientFiles():
|
|||
return not errstatus
|
||||
|
||||
|
||||
|
||||
def get_first_network_interface_with_traffic():
|
||||
with open('/proc/net/dev') as f:
|
||||
for line in f:
|
||||
|
|
Loading…
Reference in New Issue