summaryrefslogtreecommitdiffstats
path: root/src/ogRest.py
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2021-11-18 10:38:25 +0100
committerJose M. Guisado <jguisado@soleta.eu>2021-11-18 13:50:16 +0100
commitf9511932ad996a4cd75b569cfa0eb7ccc223b608 (patch)
tree936fa55dfc37d4acc5db6f0b4ad88f5634416ba1 /src/ogRest.py
parent3dfe54968b6e50d5b85391bd9302c2a4f0a21aa3 (diff)
#1065 Add windows mode
Add agent mode for windows platform. Subprocess module for shell/run is cross-platform an no change was needed. The subprocess will run with the same privilege as its parent, ogclient. TODO: Provide a windows installer. As of now, an administrator needs to install python and required libraries for this mode to be usable.
Diffstat (limited to 'src/ogRest.py')
-rw-r--r--src/ogRest.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ogRest.py b/src/ogRest.py
index 954b2be..db6a60e 100644
--- a/src/ogRest.py
+++ b/src/ogRest.py
@@ -15,7 +15,6 @@ import queue
import sys
import os
import signal
-import syslog
import logging
from logging.handlers import SysLogHandler
@@ -269,6 +268,9 @@ class ogRest():
elif self.mode == 'linux':
from src.linux.ogOperations import OgLinuxOperations
self.operations = OgLinuxOperations()
+ elif self.mode == 'windows':
+ from src.windows.ogOperations import OgWindowsOperations
+ self.operations = OgWindowsOperations()
else:
raise ValueError('Mode not supported.')