This commit is contained in:
Евгений Храмов 2023-05-16 00:53:29 +03:00
parent 0f353802de
commit 1a0d34cf00

@ -690,8 +690,6 @@ def start_stop(action, g, m, list_config=list_config):
if stop or restart: if stop or restart:
y = os.system( y = os.system(
f"~/git/hln-a/hlna.py rcon SaveWorld -m {i}") if action == "restart" or action == "stop" else "" f"~/git/hln-a/hlna.py rcon SaveWorld -m {i}") if action == "restart" or action == "stop" else ""
if y == 0:
print_line(f"Мир {i} сохранён") # Перенеси в rcon
x = os.system(f"systemctl --user {action} ark_{data['SessionName'].lower()}.service") x = os.system(f"systemctl --user {action} ark_{data['SessionName'].lower()}.service")
if x == 0: if x == 0:
@ -764,7 +762,7 @@ def rcon(m, c):
passwd = dict_adminpwd[port] passwd = dict_adminpwd[port]
with Client('127.0.0.1', port, passwd=str(passwd)) as client: with Client('127.0.0.1', port, passwd=str(passwd)) as client:
response = client.run(c) response = client.run(c)
print(f"Rcon выполнен {response} {dict_mapname[port]}") print_line(f"Rcon выполнен {response} {dict_mapname[port]}")
else: else:
pass pass
except: except: