This commit is contained in:
Евгений Храмов 2023-05-15 22:06:28 +03:00
parent 42dcdbd9f7
commit 56e3e9f5f7

@ -565,7 +565,7 @@ def switch(m, e):
os.system(f"systemctl --user stop ark_{i}") os.system(f"systemctl --user stop ark_{i}")
os.system(f"systemctl --user disable ark_{i}") os.system(f"systemctl --user disable ark_{i}")
with open(f"{dir_logs}{date}.log", "a") as f: with open(f"{dir_logs}{date}.log", "a") as f:
f.write(f"[{time}] File {i} has been moved to {dir_maps_ark}\n") f.write(f"[{t}] File {i} has been moved to {dir_maps_ark}\n")
if x == 0: if x == 0:
print(f"Карта активирована - {i}") print(f"Карта активирована - {i}")
else: else:
@ -583,7 +583,7 @@ def switch(m, e):
os.system(f"systemctl --user enable ark_{i}") os.system(f"systemctl --user enable ark_{i}")
os.system(f"systemctl --user start ark_{i}") os.system(f"systemctl --user start ark_{i}")
with open(f"{dir_logs}{date}.log", "a") as f: with open(f"{dir_logs}{date}.log", "a") as f:
f.write(f"[{time}] File {i} has been moved to {dir_deactivated}\n") f.write(f"[{t}] File {i} has been moved to {dir_deactivated}\n")
if x == 0: if x == 0:
print(f"Карта деактивирована - {i}") print(f"Карта деактивирована - {i}")
else: else:
@ -800,7 +800,7 @@ dir_server_7days = f"{dir_server}/7Days/"
now = datetime.datetime.now() now = datetime.datetime.now()
date = now.strftime("%Y-%m-%d") date = now.strftime("%Y-%m-%d")
time = now.strftime("%H:%M:%S") t = now.strftime("%H:%M:%S")
create_dir(dir_server) create_dir(dir_server)
create_dir(dir_unit) create_dir(dir_unit)
create_dir(dir_logs) create_dir(dir_logs)