Compare commits
No commits in common. "main" and "tls-again" have entirely different histories.
95
CHANGELOG.md
95
CHANGELOG.md
|
@ -6,101 +6,6 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [7.3.0] - 2025-07-31
|
||||
|
||||
### Fixed
|
||||
|
||||
- Wait for zombies
|
||||
|
||||
### Changed
|
||||
|
||||
- Change "jobid" for "job_id" for consistency
|
||||
|
||||
## [7.2.2] - 2025-07-30
|
||||
|
||||
### Added
|
||||
|
||||
- Add missing file stop-agent.ps1
|
||||
|
||||
## [7.2.1] - 2025-07-29
|
||||
|
||||
### Changed
|
||||
|
||||
- Run process in a new POSIX session and group, send termination signals to the whole process group
|
||||
|
||||
## [7.2.0] - 2025-07-28
|
||||
|
||||
### Added
|
||||
|
||||
- Log whether we are in ogLive or not
|
||||
|
||||
## [7.1.0] - 2025-07-24
|
||||
|
||||
### Changed
|
||||
|
||||
- Don't pass the "tag" parameter to CrearImagenGit
|
||||
|
||||
## [7.0.0] - 2025-07-18
|
||||
|
||||
### Changed
|
||||
|
||||
- Run the new extension-less scripts from the cloning engine
|
||||
|
||||
## [6.3.0] - 2025-07-18
|
||||
|
||||
### Added
|
||||
|
||||
- Add new parameter for Configurar
|
||||
|
||||
## [6.2.0] - 2025-07-18
|
||||
|
||||
### Added
|
||||
|
||||
- Add endpoint for GetGitData
|
||||
|
||||
## [6.1.1] - 2025-06-26
|
||||
|
||||
### Changed
|
||||
|
||||
- Write output of launch_browser into a file
|
||||
|
||||
## [6.1.0] - 2025-06-25
|
||||
|
||||
### Added
|
||||
|
||||
- Added ModificarImagenGit
|
||||
|
||||
## [6.0.0] - 2025-06-19
|
||||
|
||||
### Changed
|
||||
|
||||
- Changed the names of some endpoints for consistency between oglive and OS
|
||||
- Changed label in the windows installer
|
||||
|
||||
## [5.9.0] - 2025-06-16
|
||||
|
||||
### Added
|
||||
|
||||
- Added changes for oggit
|
||||
|
||||
## [5.8.1] - 2025-06-13
|
||||
|
||||
### Fixed
|
||||
|
||||
- Improve fail condition when no network is detected
|
||||
|
||||
## [5.8.0] - 2025-06-12
|
||||
|
||||
### Changed
|
||||
|
||||
- Agents aren't being sent any signals on user logout. On the server side, assume that client disconnection == logout
|
||||
|
||||
## [5.7.1] - 2025-06-05
|
||||
|
||||
### Fixed
|
||||
|
||||
- Correcly handle UNIX signals in the user instance of the agent
|
||||
|
||||
## [5.7.0] - 2025-05-27
|
||||
|
||||
### Changed
|
||||
|
|
|
@ -1,95 +1,3 @@
|
|||
ogagent (7.3.0-1) stable; urgency=medium
|
||||
|
||||
* Wait for zombies
|
||||
* Change "jobid" for "job_id" for consistency
|
||||
|
||||
-- OpenGnsys developers <info@opengnsys.es> Thu, 31 Jul 2025 10:35:16 +0200
|
||||
|
||||
ogagent (7.2.2-1) stable; urgency=medium
|
||||
|
||||
* Add missing file stop-agent.ps1
|
||||
|
||||
-- OpenGnsys developers <info@opengnsys.es> Wed, 30 Jul 2025 10:20:21 +0200
|
||||
|
||||
ogagent (7.2.1-1) stable; urgency=medium
|
||||
|
||||
* Run process in a new POSIX session and group, send termination signals to the whole process group
|
||||
|
||||
-- OpenGnsys developers <info@opengnsys.es> Tue, 29 Jul 2025 12:52:08 +0200
|
||||
|
||||
ogagent (7.2.0-1) stable; urgency=medium
|
||||
|
||||
* Log whether we are in ogLive or not
|
||||
|
||||
-- OpenGnsys developers <info@opengnsys.es> Mon, 28 Jul 2025 13:55:28 +0200
|
||||
|
||||
ogagent (7.1.0-1) stable; urgency=medium
|
||||
|
||||
* Don't pass the "tag" parameter to CrearImagenGit
|
||||
|
||||
-- OpenGnsys developers <info@opengnsys.es> Thu, 24 Jul 2025 15:31:59 +0200
|
||||
|
||||
ogagent (7.0.0-1) stable; urgency=medium
|
||||
|
||||
* Run the new extension-less scripts from the cloning engine
|
||||
|
||||
-- OpenGnsys developers <info@opengnsys.es> Fri, 18 Jul 2025 14:27:04 +0200
|
||||
|
||||
ogagent (6.3.0-1) stable; urgency=medium
|
||||
|
||||
* Add new parameter for Configurar
|
||||
|
||||
-- OpenGnsys developers <info@opengnsys.es> Fri, 18 Jul 2025 14:20:44 +0200
|
||||
|
||||
ogagent (6.2.0-1) stable; urgency=medium
|
||||
|
||||
* Add endpoint for GetGitData
|
||||
|
||||
-- OpenGnsys developers <info@opengnsys.es> Fri, 18 Jul 2025 14:10:06 +0200
|
||||
|
||||
ogagent (6.1.1-1) stable; urgency=medium
|
||||
|
||||
* Write output of launch_browser into a file
|
||||
|
||||
-- OpenGnsys developers <info@opengnsys.es> Thu, 26 Jun 2025 12:45:19 +0200
|
||||
|
||||
ogagent (6.1.0-1) stable; urgency=medium
|
||||
|
||||
* Add ModificarImagenGit
|
||||
|
||||
-- OpenGnsys developers <info@opengnsys.es> Wed, 25 Jun 2025 10:26:42 +0200
|
||||
|
||||
ogagent (6.0.0-1) stable; urgency=medium
|
||||
|
||||
* Unify API methods for poweroff, reboot and run script
|
||||
* Change label in the windows installer
|
||||
|
||||
-- OpenGnsys developers <info@opengnsys.es> Fri, 20 Jun 2025 10:03:15 +0200
|
||||
|
||||
ogagent (5.9.0-1) stable; urgency=medium
|
||||
|
||||
* Add changes for oggit
|
||||
|
||||
-- OpenGnsys developers <info@opengnsys.es> Mon, 16 Jun 2025 11:12:55 +0200
|
||||
|
||||
ogagent (5.8.1-1) stable; urgency=medium
|
||||
|
||||
* Improve fail condition when no network is detected
|
||||
|
||||
-- OpenGnsys developers <info@opengnsys.es> Fri, 13 Jun 2025 10:01:43 +0200
|
||||
|
||||
ogagent (5.8.0-1) stable; urgency=medium
|
||||
|
||||
* When client disconnect, assume that the user logged out
|
||||
|
||||
-- OpenGnsys developers <info@opengnsys.es> Thu, 12 Jun 2025 15:30:50 +0200
|
||||
|
||||
ogagent (5.7.1-1) stable; urgency=medium
|
||||
|
||||
* Correctly handle UNIX signals
|
||||
|
||||
-- OpenGnsys developers <info@opengnsys.es> Thu, 05 Jun 2025 12:07:30 +0200
|
||||
|
||||
ogagent (5.7.0-1) stable; urgency=medium
|
||||
|
||||
* Use TLS again
|
||||
|
|
|
@ -35,8 +35,6 @@ import json
|
|||
import sys
|
||||
import time
|
||||
import os
|
||||
import socket
|
||||
import signal
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from about_dialog_ui import Ui_OGAAboutDialog
|
||||
|
@ -330,29 +328,6 @@ if __name__ == '__main__':
|
|||
trayIcon.quit()
|
||||
sys.exit(1)
|
||||
|
||||
## begin SIGTERM handling
|
||||
signal_socket = socket.socketpair()
|
||||
signal_socket[0].setblocking(False)
|
||||
signal_socket[1].setblocking(False)
|
||||
signal.set_wakeup_fd(signal_socket[0].fileno())
|
||||
|
||||
def signal_handler(signum, frame):
|
||||
#print (f"Received signal {signum}")
|
||||
pass
|
||||
|
||||
def qt_signal_handler():
|
||||
data = signal_socket[1].recv(1)
|
||||
#print(f"Signal ({data}) received via socket, shutting down gracefully...")
|
||||
if trayIcon:
|
||||
trayIcon.quit()
|
||||
|
||||
signal.signal(signal.SIGTERM, signal_handler)
|
||||
signal.signal(signal.SIGINT, signal_handler)
|
||||
|
||||
notifier = QtCore.QSocketNotifier(signal_socket[1].fileno(), QtCore.QSocketNotifier.Type.Read)
|
||||
notifier.activated.connect(qt_signal_handler)
|
||||
## end SIGTERM handling
|
||||
|
||||
app.aboutToQuit.connect(trayIcon.cleanup)
|
||||
trayIcon.show()
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
7.3.0
|
||||
5.7.0
|
||||
|
|
|
@ -7,7 +7,7 @@ port=8000
|
|||
#path=test_modules/server,more_modules/server
|
||||
|
||||
# Remote OpenGnsys Service
|
||||
remote=https://192.168.2.1:8443/opengnsys/rest
|
||||
remote=https://192.168.2.1/opengnsys/rest
|
||||
# Alternate OpenGnsys Service (comment out to enable this option)
|
||||
#altremote=https://10.0.2.2/opengnsys/rest
|
||||
|
||||
|
|
|
@ -187,6 +187,7 @@ class REST(object):
|
|||
if self.verify_tls:
|
||||
r = requests.get(url, cert=(self.crt_file, self.key_file), verify=self.ca_file, timeout=TIMEOUT)
|
||||
else:
|
||||
logger.warning ('using insecure TLS for GET')
|
||||
r = requests.get(url, verify=False, timeout=TIMEOUT)
|
||||
else:
|
||||
r = requests.get(url, timeout=TIMEOUT)
|
||||
|
@ -199,6 +200,7 @@ class REST(object):
|
|||
if self.verify_tls:
|
||||
r = requests.post(url, data=data, headers={'content-type': 'application/json'}, cert=(self.crt_file, self.key_file), verify=self.ca_file, timeout=TIMEOUT)
|
||||
else:
|
||||
logger.warning ('using insecure TLS for POST')
|
||||
r = requests.post(url, data=data, headers={'content-type': 'application/json'}, verify=False, timeout=TIMEOUT)
|
||||
else:
|
||||
r = requests.post(url, data=data, headers={'content-type': 'application/json'}, timeout=TIMEOUT)
|
||||
|
@ -207,7 +209,7 @@ class REST(object):
|
|||
|
||||
r.raise_for_status()
|
||||
ct = r.headers['Content-Type']
|
||||
if len(ct) < 16 or 'application/json' != ct[0:16]:
|
||||
if 'application/json' != ct:
|
||||
raise Exception (f'response content-type is not "application/json" but "{ct}"')
|
||||
r = json.loads(r.content) # Using instead of r.json() to make compatible with old requests lib versions
|
||||
except requests.exceptions.RequestException as e:
|
||||
|
|
|
@ -167,7 +167,7 @@ class HTTPServerThread(threading.Thread):
|
|||
logger.debug ('HTTP server: using certificate/CA from /opt/opengnsys/etc')
|
||||
context.load_cert_chain (certfile='/opt/opengnsys/etc/ogagent.crt', keyfile='/opt/opengnsys/etc/ogagent.key')
|
||||
context.load_verify_locations (cafile='/opt/opengnsys/etc/ca.crt')
|
||||
elif pf and os.path.exists (os.path.join (pf, 'ogagent.crt')) and os.path.exists (os.path.join (pf, 'ogagent.key')) and os.path.exists (os.path.join (pf, 'ca.crt')):
|
||||
elif os.path.exists (os.path.join (pf, 'ogagent.crt')) and os.path.exists (os.path.join (pf, 'ogagent.key')) and os.path.exists (os.path.join (pf, 'ca.crt')):
|
||||
logger.debug (f'HTTP server: using certificate/CA from the installation path ({pf})')
|
||||
context.load_cert_chain (certfile=os.path.join (pf, 'ogagent.crt'), keyfile=os.path.join (pf, 'ogagent.key'))
|
||||
context.load_verify_locations (cafile=os.path.join (pf, 'ca.crt'))
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
"""
|
||||
|
||||
|
||||
import os
|
||||
import json
|
||||
import queue
|
||||
import socket
|
||||
|
@ -165,9 +164,6 @@ class ClientProcessor(threading.Thread):
|
|||
logger.debug('Got invalid message from request: {}, state: {}'.format(buf, state))
|
||||
except socket.error as e:
|
||||
# If no data is present, no problem at all, pass to check messages
|
||||
if '[WinError 10054]' in str(e):
|
||||
## windows: client disconnected
|
||||
self.running = False
|
||||
pass
|
||||
except Exception as e:
|
||||
tb = traceback.format_exc()
|
||||
|
@ -197,8 +193,6 @@ class ClientProcessor(threading.Thread):
|
|||
logger.error('Invalid message in queue: {}'.format(e))
|
||||
|
||||
logger.debug('Client processor stopped')
|
||||
if os.path.exists ('/windows/temp'): open ('/windows/temp/ogagentuser_died', 'w').close()
|
||||
else: open ( '/tmp/ogagentuser_died', 'w').close()
|
||||
try:
|
||||
self.clientSocket.close()
|
||||
except Exception:
|
||||
|
|
|
@ -23,32 +23,32 @@ class JobMgr():
|
|||
logger.debug ('args "{}"'.format (args))
|
||||
now = datetime.now (tz=timezone.utc)
|
||||
ts = now.strftime ('%Y-%m-%d %H:%M:%S.%f%z') ## '%s' doesn't work on windows
|
||||
job_id = hashlib.sha256 (now.isoformat().encode('UTF-8') + script.encode ('UTF-8')).hexdigest()[0:12]
|
||||
jobid = hashlib.sha256 (now.isoformat().encode('UTF-8') + script.encode ('UTF-8')).hexdigest()[0:12]
|
||||
p = subprocess.Popen (args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
self.jobs[job_id] = { 'p': p, 'pid': p.pid, 'starttime': ts, 'script': script, 'client': is_client, 'status': 'running', 'stdout': '', 'stderr': '' }
|
||||
self.jobs[job_id]['t1'] = threading.Thread (target=job_readstdout, args=(self.jobs[job_id],))
|
||||
self.jobs[job_id]['t2'] = threading.Thread (target=job_readstderr, args=(self.jobs[job_id],))
|
||||
self.jobs[job_id]['t1'].start()
|
||||
self.jobs[job_id]['t2'].start()
|
||||
self.jobs[jobid] = { 'p': p, 'pid': p.pid, 'starttime': ts, 'script': script, 'client': is_client, 'status': 'running', 'stdout': '', 'stderr': '' }
|
||||
self.jobs[jobid]['t1'] = threading.Thread (target=job_readstdout, args=(self.jobs[jobid],))
|
||||
self.jobs[jobid]['t2'] = threading.Thread (target=job_readstderr, args=(self.jobs[jobid],))
|
||||
self.jobs[jobid]['t1'].start()
|
||||
self.jobs[jobid]['t2'].start()
|
||||
logger.debug ('jobs "{}"'.format (self.jobs))
|
||||
return job_id
|
||||
return jobid
|
||||
|
||||
def prepare_jobs(self):
|
||||
## can't return self.jobs because the Popen object at self.jobs[id]['p'] is not serializable. So, need to create a new dict to return
|
||||
st = []
|
||||
for job_id in self.jobs:
|
||||
j = self.jobs[job_id]
|
||||
for jobid in self.jobs:
|
||||
j = self.jobs[jobid]
|
||||
entry = dict ((k, j[k]) for k in ['pid', 'starttime', 'script', 'client', 'status', 'stdout', 'stderr'])
|
||||
entry['job_id'] = job_id
|
||||
entry['jobid'] = jobid
|
||||
if j['p'].poll() is not None: ## process finished
|
||||
entry['rc'] = j['p'].returncode
|
||||
entry['status'] = 'finished'
|
||||
st.append (entry)
|
||||
return st
|
||||
|
||||
def terminate_job(self, job_id):
|
||||
if job_id not in self.jobs: return {}
|
||||
p = self.jobs[job_id]['p']
|
||||
def terminate_job(self, jobid):
|
||||
if jobid not in self.jobs: return {}
|
||||
p = self.jobs[jobid]['p']
|
||||
p.terminate()
|
||||
time.sleep (1)
|
||||
if p.poll() is not None:
|
||||
|
|
|
@ -39,7 +39,6 @@ from opengnsys.log import logger
|
|||
|
||||
from opengnsys.linux.daemon import Daemon
|
||||
|
||||
import os
|
||||
import sys
|
||||
import signal
|
||||
import json
|
||||
|
@ -72,13 +71,6 @@ class OGAgentSvc(Daemon, CommonService):
|
|||
# example
|
||||
try:
|
||||
while self.isAlive:
|
||||
client_died=False
|
||||
if os.path.exists ('/tmp/ogagentuser_died'):
|
||||
os.unlink ('/tmp/ogagentuser_died')
|
||||
client_died=True
|
||||
if client_died:
|
||||
self.notifyLogout (b'')
|
||||
|
||||
# In milliseconds, will break
|
||||
self.doWait(1000)
|
||||
except (KeyboardInterrupt, SystemExit) as e:
|
||||
|
|
|
@ -42,8 +42,6 @@ OTHER, DEBUG, INFO, WARN, ERROR, FATAL = (10000 * (x + 1) for x in range(6))
|
|||
|
||||
class LocalLogger(object):
|
||||
def __init__(self):
|
||||
self.extra = { 'in_oglive': None }
|
||||
|
||||
# tempdir is different for "user application" and "service"
|
||||
# service wil get c:\windows\temp, while user will get c:\users\XXX\temp
|
||||
# Try to open logger at /var/log path
|
||||
|
@ -53,13 +51,13 @@ class LocalLogger(object):
|
|||
for logDir in ('/var/log', os.path.expanduser('~'), tempfile.gettempdir()):
|
||||
try:
|
||||
fname1 = os.path.join (logDir, 'opengnsys.log')
|
||||
fmt1 = logging.Formatter (fmt='%(levelname)s %(asctime)s in_oglive=%(in_oglive)s (%(threadName)s) (%(funcName)s) %(message)s')
|
||||
fmt1 = logging.Formatter (fmt='%(levelname)s %(asctime)s (%(threadName)s) (%(funcName)s) %(message)s')
|
||||
fh1 = logging.FileHandler (filename=fname1, mode='a')
|
||||
fh1.setFormatter (fmt1)
|
||||
fh1.setLevel (logging.DEBUG)
|
||||
|
||||
fname2 = os.path.join (logDir, 'opengnsys.json.log')
|
||||
fmt2 = JsonFormatter ({"timestamp": "asctime", "severity": "levelname", "in_oglive": "in_oglive", "threadName": "threadName", "function": "funcName", "message": "message"}, time_format='%Y-%m-%d %H:%M:%S', msec_format='')
|
||||
fmt2 = JsonFormatter ({"timestamp": "asctime", "severity": "levelname", "threadName": "threadName", "function": "funcName", "message": "message"}, time_format='%Y-%m-%d %H:%M:%S', msec_format='')
|
||||
fh2 = logging.FileHandler (filename=fname2, mode='a')
|
||||
fh2.setFormatter (fmt2)
|
||||
fh2.setLevel (logging.DEBUG)
|
||||
|
@ -79,14 +77,11 @@ class LocalLogger(object):
|
|||
self.logger = None
|
||||
|
||||
def log(self, level, message):
|
||||
if self.extra['in_oglive'] is None:
|
||||
self.extra['in_oglive'] = os.path.exists ('/scripts/functions')
|
||||
|
||||
# Debug messages are logged to a file
|
||||
# our loglevels are 10000 (other), 20000 (debug), ....
|
||||
# logging levels are 10 (debug), 20 (info)
|
||||
# OTHER = logging.NOTSET
|
||||
self.logger.log(int(level / 1000) - 10, message, stacklevel=4, extra=self.extra)
|
||||
self.logger.log(int(level / 1000) - 10, message, stacklevel=4)
|
||||
|
||||
def isWindows(self):
|
||||
return False
|
||||
|
|
|
@ -54,9 +54,9 @@ class OpenGnSysWorker(ClientWorker):
|
|||
#self.sendServerMessage('script', {'op', 'launched'})
|
||||
|
||||
def process_terminatescript(self, json_params):
|
||||
job_id = json_params['job_id']
|
||||
logger.debug('Processing terminatescript request, job_id "{}"'.format (job_id))
|
||||
self.jobmgr.terminate_job (job_id)
|
||||
jobid = json_params['jobid']
|
||||
logger.debug('Processing terminatescript request, jobid "{}"'.format (jobid))
|
||||
self.jobmgr.terminate_job (jobid)
|
||||
|
||||
def process_preparescripts(self, json_params):
|
||||
logger.debug('Processing preparescripts request')
|
||||
|
|
|
@ -112,7 +112,7 @@ class OpenGnSysWorker(ServerWorker):
|
|||
"iph": self.interface.ip,
|
||||
"timestamp": int (time.time()),
|
||||
}
|
||||
#logger.debug (f'about to send ping ({body})')
|
||||
logger.debug (f'about to send ping ({body})')
|
||||
self.REST.sendMessage ('clients/status/webhook', body)
|
||||
|
||||
def onActivation(self):
|
||||
|
@ -147,11 +147,7 @@ class OpenGnSysWorker(ServerWorker):
|
|||
for t in range(0, 300):
|
||||
try:
|
||||
# Get the first network interface
|
||||
nets = list (operations.getNetworkInfo())
|
||||
if 0 == len (nets):
|
||||
logger.error ('No network interfaces found')
|
||||
raise Exception ('No network interfaces found')
|
||||
self.interface = nets[0]
|
||||
self.interface = list(operations.getNetworkInfo())[0]
|
||||
except Exception as e:
|
||||
# Wait 1 sec. and retry
|
||||
logger.warn (e)
|
||||
|
@ -308,7 +304,7 @@ class OpenGnSysWorker(ServerWorker):
|
|||
|
||||
@execution_level('halt')
|
||||
@check_secret
|
||||
def process_Reiniciar(self, path, get_params, post_params, server):
|
||||
def process_reboot(self, path, get_params, post_params, server):
|
||||
"""
|
||||
Launches a system reboot operation
|
||||
:param path:
|
||||
|
@ -327,7 +323,7 @@ class OpenGnSysWorker(ServerWorker):
|
|||
|
||||
@execution_level('halt')
|
||||
@check_secret
|
||||
def process_Apagar(self, path, get_params, post_params, server):
|
||||
def process_poweroff(self, path, get_params, post_params, server):
|
||||
"""
|
||||
Launches a system power off operation
|
||||
:param path:
|
||||
|
@ -347,7 +343,7 @@ class OpenGnSysWorker(ServerWorker):
|
|||
|
||||
@execution_level('full')
|
||||
@check_secret
|
||||
def process_EjecutarScript(self, path, get_params, post_params, server):
|
||||
def process_script(self, path, get_params, post_params, server):
|
||||
"""
|
||||
Processes an script execution (script should be encoded in base64)
|
||||
:param path:
|
||||
|
@ -358,35 +354,28 @@ class OpenGnSysWorker(ServerWorker):
|
|||
"""
|
||||
logger.debug('Processing script request')
|
||||
# Decoding script
|
||||
param_script = post_params.get('script')
|
||||
if not param_script:
|
||||
return {'op': 'error', 'err': 'Required parameter "script" is missing or empty'}
|
||||
try:
|
||||
b64decoded = base64.b64decode (param_script)
|
||||
except Exception as e:
|
||||
return {'op': 'error', 'err': f'Failed to decode base64: {e}'}
|
||||
script = urllib.parse.unquote (b64decoded.decode ('utf-8'))
|
||||
script = urllib.parse.unquote(base64.b64decode(post_params.get('script')).decode('utf-8'))
|
||||
logger.debug('received script "{}"'.format(script))
|
||||
|
||||
if post_params.get('client', 'false') == 'false':
|
||||
job_id = self.jobmgr.launch_job (script, False)
|
||||
return {'op': 'launched', 'job_id': job_id}
|
||||
jobid = self.jobmgr.launch_job (script, False)
|
||||
return {'op': 'launched', 'jobid': jobid}
|
||||
|
||||
else: ## post_params.get('client') is not 'false'
|
||||
## send script as-is
|
||||
self.sendClientMessage('script', {'code': script})
|
||||
#return {'op': 'launched', 'job_id': job_id} ## TODO obtain job_id generated at the client (can it be done?)
|
||||
#return {'op': 'launched', 'jobid': jobid} ## TODO obtain jobid generated at the client (can it be done?)
|
||||
return {'op': 'launched'}
|
||||
|
||||
@execution_level('full')
|
||||
@check_secret
|
||||
def process_terminatescript(self, path, get_params, post_params, server):
|
||||
job_id = post_params.get('job_id', None)
|
||||
logger.debug('Processing terminate_script request, job_id "{}"'.format (job_id))
|
||||
if job_id is None:
|
||||
jobid = post_params.get('jobid', None)
|
||||
logger.debug('Processing terminate_script request, jobid "{}"'.format (jobid))
|
||||
if jobid is None:
|
||||
return {}
|
||||
self.sendClientMessage('terminatescript', {'job_id': job_id})
|
||||
self.jobmgr.terminate_job (job_id)
|
||||
self.sendClientMessage('terminatescript', {'jobid': jobid})
|
||||
self.jobmgr.terminate_job (jobid)
|
||||
return {}
|
||||
|
||||
@execution_level('full')
|
||||
|
|
|
@ -360,105 +360,6 @@ class ogAdmClientWorker (ogLiveWorker):
|
|||
}
|
||||
return self.respuestaEjecucionComando (cmd, herror, ids)
|
||||
|
||||
def do_CrearImagenGit (self, post_params):
|
||||
for k in ['dsk', 'par', 'nci', 'ipr', 'nfn', 'ids']:
|
||||
if k not in post_params:
|
||||
logger.error (f'required parameter ({k}) not in POST params')
|
||||
return {}
|
||||
|
||||
dsk = post_params['dsk'] ## Disco
|
||||
par = post_params['par'] ## Número de partición
|
||||
nci = post_params['nci'] ## Nombre canónico de la imagen
|
||||
ipr = post_params['ipr'] ## Ip del repositorio
|
||||
nfn = post_params['nfn']
|
||||
ids = post_params['ids']
|
||||
|
||||
self.muestraMensaje (7)
|
||||
|
||||
try:
|
||||
res = self.InventariandoSoftware (dsk, par, 'InventarioSoftware') ## Crea inventario Software previamente
|
||||
except:
|
||||
logger.warning ('Error al ejecutar el comando')
|
||||
return {}
|
||||
|
||||
if res['contents']:
|
||||
self.muestraMensaje (2)
|
||||
inv_sft = res['contents']
|
||||
try:
|
||||
self.interfaceAdmin (nfn, [dsk, par, nci, ipr])
|
||||
self.muestraMensaje (9)
|
||||
herror = 0
|
||||
except:
|
||||
logger.warning ('Error al ejecutar el comando')
|
||||
self.muestraMensaje (10)
|
||||
herror = 1
|
||||
else:
|
||||
logger.warning ('Error al ejecutar el comando')
|
||||
herror = 1
|
||||
inv_sft = ''
|
||||
|
||||
self.muestraMenu()
|
||||
|
||||
cmd = {
|
||||
'nfn': 'RESPUESTA_CrearImagenGit',
|
||||
'dsk': dsk, ## Número de disco
|
||||
'par': par, ## Número de partición de donde se creó
|
||||
'ipr': ipr, ## Ip del repositorio donde se alojó
|
||||
'inv_sft': inv_sft
|
||||
}
|
||||
return self.respuestaEjecucionComando (cmd, herror, ids)
|
||||
|
||||
|
||||
def do_ModificarImagenGit (self, post_params):
|
||||
for k in ['dsk', 'par', 'nci', 'ipr', 'nfn', 'ids', 'msg']:
|
||||
if k not in post_params:
|
||||
logger.error (f'required parameter ({k}) not in POST params')
|
||||
return {}
|
||||
|
||||
dsk = post_params['dsk'] ## Disco
|
||||
par = post_params['par'] ## Número de partición
|
||||
nci = post_params['nci'] ## Nombre canónico de la imagen
|
||||
ipr = post_params['ipr'] ## Ip del repositorio
|
||||
nfn = post_params['nfn']
|
||||
ids = post_params['ids']
|
||||
msg = post_params['msg'] ## Mensaje de commit
|
||||
|
||||
self.muestraMensaje (7)
|
||||
|
||||
try:
|
||||
res = self.InventariandoSoftware (dsk, par, 'InventarioSoftware') ## Crea inventario Software previamente
|
||||
except:
|
||||
logger.warning ('Error al ejecutar el comando')
|
||||
return {}
|
||||
|
||||
if res['contents']:
|
||||
self.muestraMensaje (2)
|
||||
inv_sft = res['contents']
|
||||
try:
|
||||
self.interfaceAdmin (nfn, [dsk, par, nci, msg])
|
||||
self.muestraMensaje (9)
|
||||
herror = 0
|
||||
except:
|
||||
logger.warning ('Error al ejecutar el comando')
|
||||
self.muestraMensaje (10)
|
||||
herror = 1
|
||||
else:
|
||||
logger.warning ('Error al ejecutar el comando')
|
||||
herror = 1
|
||||
inv_sft = ''
|
||||
|
||||
self.muestraMenu()
|
||||
|
||||
cmd = {
|
||||
'nfn': 'RESPUESTA_ModificarImagenGit',
|
||||
'dsk': dsk, ## Número de disco
|
||||
'par': par, ## Número de partición de donde se creó
|
||||
'ipr': ipr, ## Ip del repositorio donde se alojó
|
||||
'inv_sft': inv_sft
|
||||
}
|
||||
return self.respuestaEjecucionComando (cmd, herror, ids)
|
||||
|
||||
|
||||
def do_RestaurarImagen (self, post_params):
|
||||
for k in ['dsk', 'par', 'idi', 'ipr', 'nci', 'ifs', 'ptc', 'nfn', 'ids']:
|
||||
if k not in post_params:
|
||||
|
@ -505,50 +406,6 @@ class ogAdmClientWorker (ogLiveWorker):
|
|||
}
|
||||
return self.respuestaEjecucionComando (cmd, herror, ids)
|
||||
|
||||
def do_RestaurarImagenGit (self, post_params):
|
||||
for k in ['dsk', 'par', 'ipr', 'nci', 'ptc', 'nfn', 'ids', 'ref']:
|
||||
if k not in post_params:
|
||||
logger.error (f'required parameter ({k}) not in POST params')
|
||||
return {}
|
||||
|
||||
dsk = post_params['dsk']
|
||||
par = post_params['par']
|
||||
ipr = post_params['ipr']
|
||||
nci = post_params['nci']
|
||||
ptc = post_params['ptc'] ## Protocolo de clonación: Unicast, Multicast, Torrent
|
||||
nfn = post_params['nfn']
|
||||
ids = post_params['ids']
|
||||
ref = post_params['ref'] ## Referencia de git a restaurar
|
||||
|
||||
self.muestraMensaje (3)
|
||||
|
||||
try:
|
||||
## the ptc.split() is useless right now, since interfaceAdmin() does ' '.join(params) in order to spawn a shell
|
||||
## however we're going to need it in the future (when everything gets translated into python), plus it's harmless now. So let's do it
|
||||
#self.interfaceAdmin (nfn, [dsk, par, nci, ipr, ptc])
|
||||
self.interfaceAdmin (nfn, [dsk, par, nci, ipr, ref] + ptc.split())
|
||||
self.muestraMensaje (11)
|
||||
herror = 0
|
||||
except:
|
||||
logger.warning ('Error al ejecutar el comando')
|
||||
self.muestraMensaje (12)
|
||||
herror = 1
|
||||
|
||||
cfg = self.LeeConfiguracion()
|
||||
if not cfg:
|
||||
logger.warning ('No se ha podido recuperar la configuración de las particiones del disco')
|
||||
|
||||
self.muestraMenu()
|
||||
|
||||
cmd = {
|
||||
'nfn': 'RESPUESTA_RestaurarImagenGit',
|
||||
'dsk': dsk, ## Número de disco
|
||||
'par': par, ## Número de partición
|
||||
'cfg': self.cfg2obj(cfg), ## Configuración de discos
|
||||
}
|
||||
return self.respuestaEjecucionComando (cmd, herror, ids)
|
||||
|
||||
|
||||
def do_Configurar (self, post_params):
|
||||
for k in ['nfn', 'dsk', 'cfg', 'ids']:
|
||||
if k not in post_params:
|
||||
|
@ -559,9 +416,8 @@ class ogAdmClientWorker (ogLiveWorker):
|
|||
dsk = post_params['dsk']
|
||||
cfg = post_params['cfg']
|
||||
ids = post_params['ids']
|
||||
check_sizes = str ('check-sizes' in post_params and 'true' == post_params['check-sizes']).lower()
|
||||
|
||||
if 'true' != check_sizes: self.muestraMensaje (4)
|
||||
self.muestraMensaje (4)
|
||||
|
||||
params = []
|
||||
disk_info = cfg.pop (0)
|
||||
|
@ -582,24 +438,23 @@ class ogAdmClientWorker (ogLiveWorker):
|
|||
cfg_str = f'{disk_info_str}!{part_info_str}%'
|
||||
|
||||
try:
|
||||
self.interfaceAdmin (nfn, ['ignored', cfg_str, check_sizes])
|
||||
if 'true' != check_sizes: self.muestraMensaje (14)
|
||||
self.interfaceAdmin (nfn, ['ignored', cfg_str])
|
||||
self.muestraMensaje (14)
|
||||
herror = 0
|
||||
except:
|
||||
logger.warning ('Error al ejecutar el comando')
|
||||
if 'true' != check_sizes: self.muestraMensaje (13)
|
||||
self.muestraMensaje (13)
|
||||
herror = 1
|
||||
|
||||
cfg = self.LeeConfiguracion()
|
||||
if not cfg:
|
||||
logger.warning ('No se ha podido recuperar la configuración de las particiones del disco')
|
||||
return {}
|
||||
|
||||
cmd = {
|
||||
'nfn': 'RESPUESTA_Configurar',
|
||||
'cfg': self.cfg2obj (cfg),
|
||||
}
|
||||
if 'true' != check_sizes:
|
||||
cfg = self.LeeConfiguracion()
|
||||
if not cfg:
|
||||
logger.warning ('No se ha podido recuperar la configuración de las particiones del disco')
|
||||
return {}
|
||||
cmd['cfg'] = self.cfg2obj (cfg)
|
||||
|
||||
self.muestraMenu()
|
||||
return self.respuestaEjecucionComando (cmd, herror, ids)
|
||||
|
||||
|
@ -961,21 +816,6 @@ class ogAdmClientWorker (ogLiveWorker):
|
|||
logger.debug ('type(post_params) "{}"'.format (type (post_params)))
|
||||
return self._long_running_job ('CrearImagen', self.do_CrearImagen, args=(post_params,))
|
||||
|
||||
def process_CrearImagenGit (self, path, get_params, post_params, server):
|
||||
logger.debug ('in process_CrearImagenGit, path "{}" get_params "{}" post_params "{}" server "{}"'.format (path, get_params, post_params, server))
|
||||
logger.debug ('type(post_params) "{}"'.format (type (post_params)))
|
||||
return self._long_running_job ('CrearImagenGit', self.do_CrearImagenGit, args=(post_params,))
|
||||
|
||||
def process_ModificarImagenGit (self, path, get_params, post_params, server):
|
||||
logger.debug ('in process_ModificarImagenGit, path "{}" get_params "{}" post_params "{}" server "{}"'.format (path, get_params, post_params, server))
|
||||
logger.debug ('type(post_params) "{}"'.format (type (post_params)))
|
||||
return self._long_running_job ('ModificarImagenGit', self.do_ModificarImagenGit, args=(post_params,))
|
||||
|
||||
def process_RestaurarImagenGit (self, path, get_params, post_params, server):
|
||||
logger.debug ('in process_RestaurarImagenGit, path "{}" get_params "{}" post_params "{}" server "{}"'.format (path, get_params, post_params, server))
|
||||
logger.debug ('type(post_params) "{}"'.format (type (post_params)))
|
||||
return self._long_running_job ('RestaurarImagenGit', self.do_RestaurarImagenGit, args=(post_params,))
|
||||
|
||||
#def process_CrearImagenBasica (self, path, get_params, post_params, server):
|
||||
# logger.debug ('in process_CrearImagenBasica, path "{}" get_params "{}" post_params "{}" server "{}"'.format (path, get_params, post_params, server))
|
||||
# logger.warning ('this method has been removed')
|
||||
|
@ -1009,11 +849,6 @@ class ogAdmClientWorker (ogLiveWorker):
|
|||
@check_secret
|
||||
def process_Configurar (self, path, get_params, post_params, server):
|
||||
logger.debug ('in process_Configurar, path "{}" get_params "{}" post_params "{}" server "{}"'.format (path, get_params, post_params, server))
|
||||
|
||||
check_sizes = str ('check-sizes' in post_params and 'true' == post_params['check-sizes']).lower()
|
||||
if 'true' == check_sizes:
|
||||
return self.do_Configurar (post_params)
|
||||
|
||||
return self._long_running_job ('Configurar', self.do_Configurar, args=(post_params,))
|
||||
|
||||
@execution_level('full')
|
||||
|
@ -1038,38 +873,3 @@ class ogAdmClientWorker (ogLiveWorker):
|
|||
r.update ({ 'nfn':'RESPUESTA_KillJob', 'job':jid })
|
||||
logger.debug (f'r aft ({r})')
|
||||
return r
|
||||
|
||||
@execution_level('full')
|
||||
@check_secret
|
||||
def process_GetGitData (self, path, get_params, post_params, server):
|
||||
logger.debug ('in process_GetGitData, path "{}" get_params "{}" post_params "{}" server "{}"'.format (path, get_params, post_params, server))
|
||||
|
||||
for k in ['nfn', 'dsk', 'par', 'nfn']:
|
||||
if k not in post_params:
|
||||
logger.error (f'required parameter ({k}) not in POST params')
|
||||
return {}
|
||||
|
||||
tmp_gitdata = f'/tmp/gitdata-{self.IPlocal}'
|
||||
nfn = post_params['nfn']
|
||||
dsk = post_params['dsk']
|
||||
par = post_params['par']
|
||||
|
||||
try:
|
||||
self.interfaceAdmin (nfn, [dsk, par, tmp_gitdata])
|
||||
herror = 0
|
||||
except:
|
||||
herror = 1
|
||||
|
||||
if not os.path.exists (tmp_gitdata):
|
||||
return self.respuestaEjecucionComando ({'nfn':'RESPUESTA_GetGitData'}, 1)
|
||||
|
||||
with open (tmp_gitdata, 'r') as fd:
|
||||
gitdata = fd.read().strip()
|
||||
|
||||
branch, repo = gitdata.split (':')
|
||||
cmd = {
|
||||
'nfn': 'RESPUESTA_GetGitData',
|
||||
'branch': branch,
|
||||
'repo': repo,
|
||||
}
|
||||
return self.respuestaEjecucionComando (cmd, herror)
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
@author: Adolfo Gómez, dkmaster at dkmon dot com
|
||||
"""
|
||||
|
||||
import os
|
||||
import json
|
||||
import socket
|
||||
import time
|
||||
|
|
|
@ -106,13 +106,6 @@ class OGAgentSvc(win32serviceutil.ServiceFramework, CommonService):
|
|||
# *********************
|
||||
try:
|
||||
while self.isAlive:
|
||||
client_died=False
|
||||
if os.path.exists ('/windows/temp/ogagentuser_died'):
|
||||
os.unlink ('/windows/temp/ogagentuser_died')
|
||||
client_died=True
|
||||
if client_died:
|
||||
self.notifyLogout (b'')
|
||||
|
||||
# Pumps & processes any waiting messages
|
||||
pythoncom.PumpWaitingMessages()
|
||||
win32event.WaitForSingleObject(self.hWaitStop, 1000)
|
||||
|
|
|
@ -44,19 +44,17 @@ OTHER, DEBUG, INFO, WARN, ERROR, FATAL = (10000 * (x + 1) for x in range(6))
|
|||
|
||||
class LocalLogger(object):
|
||||
def __init__(self):
|
||||
self.extra = { 'in_oglive': False }
|
||||
|
||||
# tempdir is different for "user application" and "service"
|
||||
# service wil get c:\windows\temp, while user will get c:\users\XXX\appdata\local\temp
|
||||
|
||||
fname1 = os.path.join (tempfile.gettempdir(), 'opengnsys.log')
|
||||
fmt1 = logging.Formatter (fmt='%(levelname)s %(asctime)s in_oglive=%(in_oglive)s (%(threadName)s) (%(funcName)s) %(message)s')
|
||||
fmt1 = logging.Formatter (fmt='%(levelname)s %(asctime)s (%(threadName)s) (%(funcName)s) %(message)s')
|
||||
fh1 = logging.FileHandler (filename=fname1, mode='a')
|
||||
fh1.setFormatter (fmt1)
|
||||
fh1.setLevel (logging.DEBUG)
|
||||
|
||||
fname2 = os.path.join (tempfile.gettempdir(), 'opengnsys.json.log')
|
||||
fmt2 = JsonFormatter ({"timestamp": "asctime", "severity": "levelname", "in_oglive": "in_oglive", "threadName": "threadName", "function": "funcName", "message": "message"}, time_format='%Y-%m-%d %H:%M:%S', msec_format='')
|
||||
fmt2 = JsonFormatter ({"timestamp": "asctime", "severity": "levelname", "threadName": "threadName", "function": "funcName", "message": "message"}, time_format='%Y-%m-%d %H:%M:%S', msec_format='')
|
||||
fh2 = logging.FileHandler (filename=fname2, mode='a')
|
||||
fh2.setFormatter (fmt2)
|
||||
fh2.setLevel (logging.DEBUG)
|
||||
|
@ -73,7 +71,7 @@ class LocalLogger(object):
|
|||
# our loglevels are 10000 (other), 20000 (debug), ....
|
||||
# logging levels are 10 (debug), 20 (info)
|
||||
# OTHER = logging.NOTSET
|
||||
self.logger.log(int(level / 1000 - 10), message, stacklevel=4, extra=self.extra)
|
||||
self.logger.log(int(level / 1000 - 10), message, stacklevel=4)
|
||||
|
||||
if level < INFO or self.serviceLogger is False: # Only information and above will be on event log
|
||||
return
|
||||
|
|
|
@ -35,7 +35,6 @@ import re
|
|||
import time
|
||||
try: import dbus ## don't fail on windows (the worker will later refuse to load anyway)
|
||||
except: pass
|
||||
import select
|
||||
import random
|
||||
import subprocess
|
||||
import threading
|
||||
|
@ -159,10 +158,10 @@ class ogLiveWorker(ServerWorker):
|
|||
if 'thread' not in self.thread_list[job_id]: return { 'res': 2, 'der': 'Job is not running' }
|
||||
t = self.thread_list[job_id]['thread']
|
||||
pid = self.thread_list[job_id]['child_pid']
|
||||
logger.debug (f'pid/pgid/sid ({pid})')
|
||||
logger.debug (f'pid ({pid})')
|
||||
try_times = 8
|
||||
sig = signal.SIGTERM
|
||||
msg = f'could not killpg pid ({pid}) after ({try_times}) tries'
|
||||
msg = f'could not kill pid ({pid}) after ({try_times}) tries'
|
||||
success = 2 ## mimic cmd['res'] in respuestaEjecucionComando(): "1" means success, "2" means failed
|
||||
while True:
|
||||
t.join (0.05)
|
||||
|
@ -176,10 +175,10 @@ class ogLiveWorker(ServerWorker):
|
|||
## this is fine in the first iteration of the loop, before we send any signals. In the rest of iterations, after some signals were sent, msg should be 'job terminated' instead.
|
||||
if pid:
|
||||
if os.path.exists (f'/proc/{pid}'):
|
||||
logger.debug (f'sending signal ({sig}) to process group ({pid})')
|
||||
logger.debug (f'sending signal ({sig}) to pid ({pid})')
|
||||
## if the process finishes just here, nothing happens: the signal is sent to the void
|
||||
os.killpg (pid, sig)
|
||||
#subprocess.run (['kill', '--signal', str(sig), f'-{pid}']) ## negative PID is used for sending signals to the process group
|
||||
os.kill (pid, sig)
|
||||
#subprocess.run (['kill', '--signal', str(sig), str(pid)])
|
||||
else:
|
||||
msg = f'pid ({pid}) is gone, nothing to kill'
|
||||
success = 1
|
||||
|
@ -260,12 +259,12 @@ class ogLiveWorker(ServerWorker):
|
|||
self.REST.sendMessage ('clients/status/webhook', body)
|
||||
|
||||
def interfaceAdmin (self, method, parametros=[]):
|
||||
if method not in ['ConsolaRemota', 'procesaCache']:
|
||||
if method in ['Apagar', 'CambiarAcceso', 'Configurar', 'CrearImagen', 'EjecutarScript', 'getConfiguration', 'getIpAddress', 'IniciarSesion', 'InventarioHardware', 'InventarioSoftware', 'Reiniciar', 'RestaurarImagen']:
|
||||
## python
|
||||
logger.debug (f'({method}) is a python method')
|
||||
exe = '{}/{}'.format (self.pathinterface, method)
|
||||
exe = '{}/{}.py'.format (self.pathinterface, method)
|
||||
proc = [exe]+parametros
|
||||
else:
|
||||
else: ## ConsolaRemota procesaCache
|
||||
## bash
|
||||
logger.debug (f'({method}) is a bash method')
|
||||
exe = '{}/{}'.format (self.pathinterface, method)
|
||||
|
@ -284,35 +283,24 @@ class ogLiveWorker(ServerWorker):
|
|||
proc = ['bash', '-c', '{} {}'.format (devel_bash_prefix, exe)]
|
||||
|
||||
logger.debug ('subprocess.run ("{}")'.format (' '.join (proc)))
|
||||
p = subprocess.Popen (proc, stdout=subprocess.PIPE, stderr=subprocess.PIPE, start_new_session=True)
|
||||
p = subprocess.Popen (proc, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
if self.pid_q:
|
||||
self.pid_q.put (p.pid) ## p.pid is also a session ID and a process group ID--we'll use it later to send signals to the whole group
|
||||
self.pid_q.put (p.pid)
|
||||
else:
|
||||
## esto sucede por ejemplo cuando arranca el agente, que estamos en interfaceAdmin() en el mismo hilo, sin _long_running_job ni hilo separado
|
||||
#logger.debug ('no queue--not writing any PID to it')
|
||||
pass
|
||||
|
||||
sout = serr = ''
|
||||
finished = False
|
||||
while True:
|
||||
try:
|
||||
p.wait (0.05)
|
||||
finished = True
|
||||
except subprocess.TimeoutExpired:
|
||||
pass
|
||||
|
||||
ready_to_read, _, _ = select.select ([p.stdout, p.stderr], [], [], 0.2)
|
||||
if p.stdout in ready_to_read:
|
||||
l = p.stdout.readline()
|
||||
while p.poll() is None:
|
||||
for l in iter (p.stdout.readline, b''):
|
||||
partial = l.decode ('utf-8', 'ignore')
|
||||
if self.stdout_q: self.stdout_q.put (partial)
|
||||
sout += partial
|
||||
if p.stderr in ready_to_read:
|
||||
l = p.stderr.readline()
|
||||
for l in iter (p.stderr.readline, b''):
|
||||
partial = l.decode ('utf-8', 'ignore')
|
||||
serr += partial
|
||||
|
||||
if finished: break
|
||||
time.sleep (1)
|
||||
sout = sout.strip()
|
||||
serr = serr.strip()
|
||||
|
||||
|
@ -397,10 +385,8 @@ class ogLiveWorker(ServerWorker):
|
|||
b.call_blocking (dest, path, interface, method, 's', [url])
|
||||
except Exception as e:
|
||||
if 'ServiceUnknown' in str(e):
|
||||
logger.warning ('browser is not running, launching a new one')
|
||||
browser_log_fd = open ('/var/log/launch_browser.log', 'a')
|
||||
subprocess.Popen (['/usr/bin/launch_browser', url], stdout=browser_log_fd, stderr=subprocess.STDOUT)
|
||||
browser_log_fd.close()
|
||||
## browser not running
|
||||
subprocess.Popen (['/usr/bin/launch_browser', url])
|
||||
else:
|
||||
logger.error (f'Error al cambiar URL: ({e})')
|
||||
return False
|
||||
|
@ -437,7 +423,7 @@ class ogLiveWorker(ServerWorker):
|
|||
k, v = item.split ('=', maxsplit=1)
|
||||
elem[k] = v
|
||||
|
||||
if elem: obj.append (elem)
|
||||
obj.append (elem)
|
||||
|
||||
return obj
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
get-process -name ogagentuser|stop-process
|
|
@ -217,7 +217,7 @@ FunctionEnd
|
|||
Function GetParameters
|
||||
${GetOptions} $CMDLINE "/server" $SERVERIP_VALUE
|
||||
${If} $SERVERIP_VALUE == ""
|
||||
StrCpy $SERVERIP_VALUE "192.168.2.1:8443"
|
||||
StrCpy $SERVERIP_VALUE "192.168.2.10"
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
|
@ -226,12 +226,10 @@ LangString PARAMS_TITLE ${LANG_ENGLISH} "Setup parameters"
|
|||
LangString PARAMS_TITLE ${LANG_SPANISH} "Parametros de configuracion"
|
||||
LangString PARAMS_TITLE ${LANG_FRENCH} "Parametres de configuration"
|
||||
LangString PARAMS_TITLE ${LANG_GERMAN} "Setup-Parameter"
|
||||
|
||||
LangString SERVER_LABEL ${LANG_ENGLISH} "OpenGnsys Server IP Address and port (eg. 192.168.98.99:8443)"
|
||||
LangString SERVER_LABEL ${LANG_SPANISH} "Direccion IP y puerto del Servidor OpenGnsys (p. ej. 192.168.98.99:8443)"
|
||||
LangString SERVER_LABEL ${LANG_FRENCH} "Adresse IP et port du Serveur OpenGnsys (ex. 192.168.98.99:8443)"
|
||||
LangString SERVER_LABEL ${LANG_GERMAN} "OpenGnsys Server IP-Adresse und Port (z. B. 192.168.98.99:8443)"
|
||||
|
||||
LangString SERVER_LABEL ${LANG_ENGLISH} "OpenGnsys Server IP Address"
|
||||
LangString SERVER_LABEL ${LANG_SPANISH} "Direccion IP del Servidor OpenGnsys"
|
||||
LangString SERVER_LABEL ${LANG_FRENCH} "Adresse IP du Serveur OpenGnsys"
|
||||
LangString SERVER_LABEL ${LANG_GERMAN} "OpenGnsys-Server-IP-Adresse"
|
||||
LangString ^UninstallLink ${LANG_ENGLISH} "Uninstall $(^Name)"
|
||||
LangString ^UninstallLink ${LANG_SPANISH} "Desinstalar $(^Name)"
|
||||
LangString ^UninstallLink ${LANG_FRENCH} "D<>sinstaller $(^Name)"
|
||||
|
|
Loading…
Reference in New Issue