--config option
This commit is contained in:
parent
2d7f6ae856
commit
bfce15dad7
12
surok.py
12
surok.py
@ -8,8 +8,18 @@ from surok.templates import gen
|
|||||||
from surok.discovery import resolve
|
from surok.discovery import resolve
|
||||||
from surok.system import reload_conf
|
from surok.system import reload_conf
|
||||||
|
|
||||||
|
|
||||||
# Load base configurations
|
# Load base configurations
|
||||||
f = open('conf/surok.json', 'r')
|
surok_conf = '/etc/surok/conf/surok.json'
|
||||||
|
|
||||||
|
# Command line arguments
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument('-c', '--config')
|
||||||
|
args = parser.parse_args()
|
||||||
|
if args.config:
|
||||||
|
surok_conf = args.config
|
||||||
|
|
||||||
|
f = open(surok_conf, 'r')
|
||||||
conf = json.loads(f.read())
|
conf = json.loads(f.read())
|
||||||
print(conf)
|
print(conf)
|
||||||
f.close()
|
f.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user