|
|
|
@ -55,27 +55,32 @@ class useMYSQL:
|
|
|
|
logger.info('(MYSQL) error, problem with cursor execute')
|
|
|
|
logger.info('(MYSQL) error, problem with cursor execute')
|
|
|
|
raise Exception('Problem with cursor execute')
|
|
|
|
raise Exception('Problem with cursor execute')
|
|
|
|
|
|
|
|
|
|
|
|
for (callsign, mode, enabled, _repeat, max_peers, export_ambe, ip, port, passphrase, group_hangtime, use_acl, reg_acl, sub_acl, tgid_ts1_acl, tgid_ts2_acl, default_ua_timer, single_mode, voice_ident) in _cursor:
|
|
|
|
for (callsign, mode, enabled, _repeat, max_peers, export_ambe, ip, port, passphrase, group_hangtime, use_acl, reg_acl, sub_acl, tgid_ts1_acl, tgid_ts2_acl, default_ua_timer, single_mode, voice_ident,ts1_static,ts2_static,default_reflector) in _cursor:
|
|
|
|
|
|
|
|
try:
|
|
|
|
CONFIG['SYSTEMS'].update({callsign: {
|
|
|
|
CONFIG['SYSTEMS'].update({callsign: {
|
|
|
|
'MODE': mode,
|
|
|
|
'MODE': mode,
|
|
|
|
'ENABLED': bool(enabled),
|
|
|
|
'ENABLED': bool(enabled),
|
|
|
|
'REPEAT': bool(_repeat),
|
|
|
|
'REPEAT': bool(_repeat),
|
|
|
|
'MAX_PEERS': int(max_peers),
|
|
|
|
'MAX_PEERS': int(max_peers),
|
|
|
|
'IP': ip,
|
|
|
|
'IP': ip,
|
|
|
|
'PORT': int(port),
|
|
|
|
'PORT': int(port),
|
|
|
|
'PASSPHRASE': passphrase,
|
|
|
|
'PASSPHRASE': passphrase,
|
|
|
|
'GROUP_HANGTIME': int(group_hangtime),
|
|
|
|
'GROUP_HANGTIME': int(group_hangtime),
|
|
|
|
'USE_ACL': bool(use_acl),
|
|
|
|
'USE_ACL': bool(use_acl),
|
|
|
|
'REG_ACL': reg_acl,
|
|
|
|
'REG_ACL': reg_acl,
|
|
|
|
'SUB_ACL': sub_acl,
|
|
|
|
'SUB_ACL': sub_acl,
|
|
|
|
'TG1_ACL': tgid_ts1_acl,
|
|
|
|
'TG1_ACL': tgid_ts1_acl,
|
|
|
|
'TG2_ACL': tgid_ts2_acl,
|
|
|
|
'TG2_ACL': tgid_ts2_acl,
|
|
|
|
'DEFAULT_UA_TIMER': int(default_ua_timer),
|
|
|
|
'DEFAULT_UA_TIMER': int(default_ua_timer),
|
|
|
|
'SINGLE_MODE': bool(single_mode),
|
|
|
|
'SINGLE_MODE': bool(single_mode),
|
|
|
|
'VOICE_IDENT': bool(voice_ident)
|
|
|
|
'VOICE_IDENT': bool(voice_ident),
|
|
|
|
}})
|
|
|
|
'TS1_STATIC': ts1_static,
|
|
|
|
CONFIG['SYSTEMS'][callsign].update({'PEERS': {}})
|
|
|
|
'TS2_STATIC': ts2_static,
|
|
|
|
|
|
|
|
'DEFAULT_REFLECTOR': int(default_reflector)
|
|
|
|
|
|
|
|
}})
|
|
|
|
|
|
|
|
CONFIG['SYSTEMS'][callsign].update({'PEERS': {}})
|
|
|
|
|
|
|
|
except TypeError:
|
|
|
|
|
|
|
|
logger.info('(MYSQL) Problem with data from MySQL - TypeError, carrying on to next row')
|
|
|
|
|
|
|
|
|
|
|
|
return(CONFIG['SYSTEMS'])
|
|
|
|
return(CONFIG['SYSTEMS'])
|
|
|
|
|
|
|
|
|
|
|
|
|