From 159b14410724fe5c13f64461489da21a447a2e6a Mon Sep 17 00:00:00 2001 From: robo-bo Date: Wed, 31 Aug 2022 16:29:41 +0300 Subject: [PATCH] turn off admin for linux pyOpenRPA --- Agent/config.py | 4 ++-- Orchestrator/config.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Agent/config.py b/Agent/config.py index ba73ef98..6cdfdc6d 100644 --- a/Agent/config.py +++ b/Agent/config.py @@ -9,7 +9,7 @@ if lPyOpenRPASourceFolderPathStr != "": sys.path.insert(0,os.path.abspath(os.pat from pyOpenRPA.Agent import __Agent__ from pyOpenRPA.Tools import CrossOS -if CrossOS.IS_WINDOWS_BOOL: lPortInt = 80 +if CrossOS.IS_WINDOWS_BOOL: lPortInt = 1024 if CrossOS.IS_LINUX_BOOL: lPortInt = 1024 gUserNameUpperStr = getpass.getuser().upper() if __name__ == "__main__": # New init way @@ -61,7 +61,7 @@ if __name__ == "__main__": # New init way lL.setLevel(logging.INFO) # create the logging file handler mRobotLoggerFH = logging.FileHandler( - os.path.normpath("Logs\\" + gUserNameUpperStr + "_" + datetime.datetime.now().strftime("%Y_%m_%d") + ".log")) + CrossOS.PathStr("Logs\\" + gUserNameUpperStr + "_" + datetime.datetime.now().strftime("%Y_%m_%d") + ".log")) mRobotLoggerFormatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s') mRobotLoggerFH.setFormatter(mRobotLoggerFormatter) # add handler to logger object diff --git a/Orchestrator/config.py b/Orchestrator/config.py index 69449c1a..537c9474 100644 --- a/Orchestrator/config.py +++ b/Orchestrator/config.py @@ -12,8 +12,8 @@ if lPyOpenRPASourceFolderPathStr != "": sys.path.insert(0,os.path.abspath(os.pat from pyOpenRPA.Orchestrator import SettingsTemplate # Import functionallity from pyOpenRPA.Tools import CrossOS from pyOpenRPA import Orchestrator # Import orchestrator main -#Run as administrator -if not Orchestrator.OrchestratorIsAdmin(): +#Run as administrator (ONLY FOR WINDOWS) +if not Orchestrator.OrchestratorIsAdmin() and CrossOS.IS_WINDOWS_BOOL: Orchestrator.OrchestratorRerunAsAdmin() print(f"Orchestrator will be run as administrator!") else: