fix bugs
This commit is contained in:
parent
ff25a032c6
commit
3229360f70
@ -2885,7 +2885,7 @@ if __name__ == '__main__':
|
|||||||
proxy_master_list.append(i)
|
proxy_master_list.append(i)
|
||||||
# Start proxy as a thread (if enabled in config) for each set of MASTERs
|
# Start proxy as a thread (if enabled in config) for each set of MASTERs
|
||||||
for m in proxy_master_list:
|
for m in proxy_master_list:
|
||||||
if CONFIG['SYSTEMS'][m]['EXTERNAL_PROXY_SCRIPT'] == True:
|
if CONFIG['SYSTEMS'][m]['EXTERNAL_PROXY_SCRIPT'] == False:
|
||||||
proxy_thread = threading.Thread(target=hotspot_proxy, args=(CONFIG['SYSTEMS'][m]['EXTERNAL_PORT'],CONFIG['SYSTEMS'][m]['INTERNAL_PORT_START'],CONFIG['SYSTEMS'][m]['INTERNAL_PORT_STOP'],))
|
proxy_thread = threading.Thread(target=hotspot_proxy, args=(CONFIG['SYSTEMS'][m]['EXTERNAL_PORT'],CONFIG['SYSTEMS'][m]['INTERNAL_PORT_START'],CONFIG['SYSTEMS'][m]['INTERNAL_PORT_STOP'],))
|
||||||
proxy_thread.daemon = True
|
proxy_thread.daemon = True
|
||||||
proxy_thread.start()
|
proxy_thread.start()
|
||||||
|
@ -135,22 +135,22 @@ def build_bridges():
|
|||||||
proxy_list = []
|
proxy_list = []
|
||||||
unique = str('_' + str(random.randint(100, 999)))
|
unique = str('_' + str(random.randint(100, 999)))
|
||||||
for i in CONFIG['SYSTEMS']:
|
for i in CONFIG['SYSTEMS']:
|
||||||
|
print(CONFIG['SYSTEMS'][i])
|
||||||
if CONFIG['SYSTEMS'][i]['ENABLED'] == True:
|
if CONFIG['SYSTEMS'][i]['ENABLED'] == True:
|
||||||
if CONFIG['SYSTEMS'][i]['MODE'] == 'PROXY':
|
if CONFIG['SYSTEMS'][i]['MODE'] == 'PROXY':
|
||||||
proxy_list.append(i + unique)
|
proxy_list.append(i + unique)
|
||||||
|
for p in proxy_list:
|
||||||
for b in BRIDGES_TEMPLATE:
|
for b in BRIDGES_TEMPLATE:
|
||||||
for s in BRIDGES_TEMPLATE[b]:
|
for s in BRIDGES_TEMPLATE[b]:
|
||||||
if s['SYSTEM'] + unique in proxy_list:
|
print(s)
|
||||||
n_systems = CONFIG['SYSTEMS'][i]['INTERNAL_PORT_STOP'] - CONFIG['SYSTEMS'][i]['INTERNAL_PORT_START']
|
if s['SYSTEM'] + unique in proxy_list:
|
||||||
n_count = 0
|
n_systems = CONFIG['SYSTEMS'][i]['INTERNAL_PORT_STOP'] - CONFIG['SYSTEMS'][i]['INTERNAL_PORT_START']
|
||||||
while n_count < n_systems:
|
n_count = 0
|
||||||
built_bridge[b].append({'SYSTEM': s['SYSTEM'] + '-' + str(n_count), 'TS': s['TS'], 'TGID': s['TGID'], 'ACTIVE': s['ACTIVE'], 'TIMEOUT': s['TIMEOUT'], 'TO_TYPE': s['TO_TYPE'], 'ON': s['ON'], 'OFF': s['OFF'], 'RESET': s['RESET']})
|
while n_count < n_systems:
|
||||||
n_count = n_count + 1
|
built_bridge[b].append({'SYSTEM': s['SYSTEM'] + '-' + str(n_count), 'TS': s['TS'], 'TGID': s['TGID'], 'ACTIVE': s['ACTIVE'], 'TIMEOUT': s['TIMEOUT'], 'TO_TYPE': s['TO_TYPE'], 'ON': s['ON'], 'OFF': s['OFF'], 'RESET': s['RESET']})
|
||||||
built_bridge[b].remove(s)
|
n_count = n_count + 1
|
||||||
|
built_bridge[b].remove(s)
|
||||||
return built_bridge
|
return built_bridge
|
||||||
|
|
||||||
BRIDGES = build_bridges()
|
|
||||||
############################################################################################################33
|
############################################################################################################33
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
Loading…
Reference in New Issue
Block a user