From ad0c701eaca27960a3d89f7c692bafe462d1e4f7 Mon Sep 17 00:00:00 2001 From: xpamych Date: Sat, 13 May 2023 17:32:42 +0300 Subject: [PATCH] rcon --- hlna.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hlna.py b/hlna.py index 5351761..9d7536d 100755 --- a/hlna.py +++ b/hlna.py @@ -505,6 +505,8 @@ def start(g, m, b, name_server=list_config): data = read_yaml(i) x = os.system(f"systemctl --user start ark_{data['SessionName'].lower()}.service") print_line(x) + if x == 0: + print_line("Ok") else: print("Ни одной карты не установлено") @@ -538,7 +540,7 @@ def stop(g, m, b, name_server=list_config): for i in names_serverstart: data = read_yaml(i) - rcon(m, "SaveWorld") + os.system(f"~/git/hln-a/hlna.py rcon -m {i} -c SaveWorld") x = os.system(f"systemctl --user stop ark_{data['SessionName'].lower()}.service") print_line(x) else: