mirror of
https://github.com/ThomasGsp/HyperProxmox.git
synced 2025-02-12 11:12:10 +00:00
modified: startup.py
This commit is contained in:
parent
5c615618bd
commit
6214fb9754
1 changed files with 4 additions and 3 deletions
7
code/scripts/main/startup.py
Normal file → Executable file
7
code/scripts/main/startup.py
Normal file → Executable file
|
@ -29,8 +29,9 @@ if __name__ == "__main__":
|
|||
args = parser.parse_args()
|
||||
|
||||
""" Read conf """
|
||||
getpathscriptdir = os.path.dirname(sys.argv[0])
|
||||
localconf = configparser.ConfigParser()
|
||||
localconf.read('private/conf/config')
|
||||
localconf.read("{pathrun}/private/conf/config".format(pathrun=getpathscriptdir))
|
||||
|
||||
generalconf = {
|
||||
"logger": {"logs_level": localconf['logger']['logs_level'],
|
||||
|
@ -74,7 +75,7 @@ if __name__ == "__main__":
|
|||
print("You MUST save your passphrase in a security place !")
|
||||
key_pvt = CritConf.read_private_key(localconf['system']['key_pvt'], passhash)
|
||||
else:
|
||||
print(gen['Error'])
|
||||
print(gen['value'])
|
||||
logger.write({"thread":threading.get_ident(), "result": "ERROR", "type": "HYPERPROXMOX", "value": "Your key is not create due to an error: {0}".format(gen['value'])})
|
||||
exit(1)
|
||||
|
||||
|
@ -168,4 +169,4 @@ if __name__ == "__main__":
|
|||
""" Init API thread """
|
||||
logger.write({"thread":threading.get_ident(), "result": "INFO", "type": "HYPERPROXMOX", "value": "Init API thread"})
|
||||
api_th = ThreadAPI(1, "ThreadAPI", urls, core, generalconf, logger)
|
||||
api_th.start()
|
||||
api_th.start()
|
||||
|
|
Loading…
Reference in a new issue