mirror of https://github.com/kf7eel/hbnet
fix dashboard disable bug
This commit is contained in:
parent
705d33e66e
commit
fe38910258
|
|
@ -1897,29 +1897,30 @@ if __name__ == '__main__':
|
||||||
with open(user_settings_file, 'w') as user_dict_file:
|
with open(user_settings_file, 'w') as user_dict_file:
|
||||||
user_dict_file.write("{1: [{'call': 'N0CALL'}, {'ssid': ''}, {'icon': ''}, {'comment': ''}, {'pin': ''}, {'APRS': False}]}")
|
user_dict_file.write("{1: [{'call': 'N0CALL'}, {'ssid': ''}, {'icon': ''}, {'comment': ''}, {'pin': ''}, {'APRS': False}]}")
|
||||||
user_dict_file.close()
|
user_dict_file.close()
|
||||||
# Check to see if dashboard files exist
|
if CONFIG['DATA_CONFIG']['USE_DASHBOARD'] == True:
|
||||||
if Path(loc_file).is_file():
|
# Check to see if dashboard files exist
|
||||||
pass
|
if Path(loc_file).is_file():
|
||||||
else:
|
pass
|
||||||
Path(loc_file).touch()
|
else:
|
||||||
with open(loc_file, 'w') as user_loc_file:
|
Path(loc_file).touch()
|
||||||
user_loc_file.write("[]")
|
with open(loc_file, 'w') as user_loc_file:
|
||||||
user_loc_file.close()
|
user_loc_file.write("[]")
|
||||||
if Path(bb_file).is_file():
|
user_loc_file.close()
|
||||||
pass
|
if Path(bb_file).is_file():
|
||||||
else:
|
pass
|
||||||
Path(bb_file).touch()
|
else:
|
||||||
with open(bb_file, 'w') as user_bb_file:
|
Path(bb_file).touch()
|
||||||
user_bb_file.write("[]")
|
with open(bb_file, 'w') as user_bb_file:
|
||||||
user_bb_file.close()
|
user_bb_file.write("[]")
|
||||||
|
user_bb_file.close()
|
||||||
|
|
||||||
if Path(sms_file).is_file():
|
if Path(sms_file).is_file():
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
Path(sms_file).touch()
|
Path(sms_file).touch()
|
||||||
with open(sms_file, 'w') as user_sms_file:
|
with open(sms_file, 'w') as user_sms_file:
|
||||||
user_sms_file.write("[]")
|
user_sms_file.write("[]")
|
||||||
user_sms_file.close()
|
user_sms_file.close()
|
||||||
## try:
|
## try:
|
||||||
## Path('/tmp/.hblink_data_que_' + str(CONFIG['DATA_CONFIG']['APRS_LOGIN_CALL']).upper() + '/').mkdir(parents=True, exist_ok=True)
|
## Path('/tmp/.hblink_data_que_' + str(CONFIG['DATA_CONFIG']['APRS_LOGIN_CALL']).upper() + '/').mkdir(parents=True, exist_ok=True)
|
||||||
## logger.info('Created que directory')
|
## logger.info('Created que directory')
|
||||||
|
|
|
||||||
|
|
@ -306,7 +306,7 @@ def build_config(_config_file):
|
||||||
CONFIG['SYSTEMS'].update({section: {
|
CONFIG['SYSTEMS'].update({section: {
|
||||||
'MODE': config.get(section, 'MODE'),
|
'MODE': config.get(section, 'MODE'),
|
||||||
'ENABLED': config.getboolean(section, 'ENABLED'),
|
'ENABLED': config.getboolean(section, 'ENABLED'),
|
||||||
'USE_USER_MAN': config.getboolean(section, 'USE_USER_MAN'),
|
## 'USE_USER_MAN': config.getboolean(section, 'USE_USER_MAN'),
|
||||||
'REPEAT': config.getboolean(section, 'REPEAT'),
|
'REPEAT': config.getboolean(section, 'REPEAT'),
|
||||||
'MAX_PEERS': config.getint(section, 'MAX_PEERS'),
|
'MAX_PEERS': config.getint(section, 'MAX_PEERS'),
|
||||||
'IP': gethostbyname(config.get(section, 'IP')),
|
'IP': gethostbyname(config.get(section, 'IP')),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue