Enable logger with env var
This commit is contained in:
parent
43f611a3d2
commit
992d6b6ce6
7
run.py
7
run.py
@ -174,6 +174,11 @@ gateway_conf['contact_email'] = os.getenv('GW_CONTACT_EMAIL', "")
|
||||
gateway_conf['description'] = description
|
||||
gateway_conf['stat_file'] = 'loragwstat.json'
|
||||
|
||||
if(os.getenv('GW_LOGGER', "false")=="true"):
|
||||
gateway_conf['logger'] = True
|
||||
else:
|
||||
gateway_conf['logger'] = False
|
||||
|
||||
if(os.getenv('GW_FWD_CRC_ERR', "false")=="true"):
|
||||
#default is False
|
||||
gateway_conf['forward_crc_error'] = True
|
||||
@ -296,8 +301,6 @@ with open('/opt/ttn-gateway/global_conf.json', 'w') as the_file:
|
||||
the_file.write(json.dumps(local_conf, indent=4))
|
||||
|
||||
|
||||
# TODO: Cayenne monitoring script
|
||||
|
||||
|
||||
# Endless loop to reset and restart packet forwarder
|
||||
while True:
|
||||
|
Loading…
Reference in New Issue
Block a user