1
This commit is contained in:
		
							
								
								
									
										6
									
								
								hlna.py
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								hlna.py
									
									
									
									
									
								
							| @@ -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) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user