1
This commit is contained in:
parent
e7d7c8cc2f
commit
cad5cc5bb1
10
hlna.py
10
hlna.py
@ -427,12 +427,12 @@ def enablemap(m, e):
|
||||
|
||||
|
||||
@hlna.command()
|
||||
def servers(map_server=list_config):
|
||||
def servers(list_config=list_config):
|
||||
# Добавить сортивку по кластерам и вывод несколько столбиков
|
||||
if map_server == [] and delist_config == []:
|
||||
if list_config == [] and delist_config == []:
|
||||
print("Сервера не сконфигурированы")
|
||||
else:
|
||||
for i in map_server:
|
||||
for i in list_config:
|
||||
data = read_yaml(i)
|
||||
x = os.system(f"lsof -w -i :{data['Port']}")
|
||||
if x == 0:
|
||||
@ -497,7 +497,7 @@ def restart(g, m, b):
|
||||
start_stop("restart", g, m, b)
|
||||
|
||||
|
||||
def start_stop(action, g, m, b):
|
||||
def start_stop(action, g, m, b, list_config=list_config):
|
||||
if g == "ark":
|
||||
dict_mapname = {}
|
||||
dict_allmapname = []
|
||||
@ -509,7 +509,7 @@ def start_stop(action, g, m, b):
|
||||
for ns, v in dict_mapname.items():
|
||||
if v in m:
|
||||
names_serverstart.append(ns)
|
||||
if list_config != []: #Перенести выше для проверки наличия конфигов
|
||||
if list_config: #Перенести выше для проверки наличия конфигов
|
||||
if b == '':
|
||||
if m == "all":
|
||||
names_serverstart = dict_allmapname
|
||||
|
Loading…
Reference in New Issue
Block a user