refs #535 Adds program dir to open the config.json
parent
f0e390aa98
commit
c9bdb52da8
|
@ -1,3 +1,4 @@
|
|||
import os
|
||||
#!/usr/bin/env python3
|
||||
##################################################################################
|
||||
##### ogBoot installer script ####
|
||||
|
@ -12,8 +13,9 @@ PROGRAM = os.path.splitext(os.path.basename(sys.argv[0]))[0]
|
|||
PROGRAM_DIR = os.path.dirname(os.path.realpath(sys.argv[0]))
|
||||
PROGRAM_NAME = os.path.basename(sys.argv[0])
|
||||
|
||||
with open('config.json', 'r') as f:
|
||||
config = json.load(f)
|
||||
config_file = os.path.join(PROGRAM_DIR, 'config.json')
|
||||
with open(config_file, 'r') as f:
|
||||
config = json.load(f)
|
||||
|
||||
OGCORE_IP = config["ogCore_ServerIP"]
|
||||
OGCORE_SERVER = config["ogCore_Server"]
|
||||
|
|
Loading…
Reference in New Issue