mirror of
				https://gitlab.sectorq.eu/jaydee/omv_backup.git
				synced 2025-10-30 10:01:11 +01:00 
			
		
		
		
	build
This commit is contained in:
		| @@ -235,10 +235,7 @@ if _STOP: | |||||||
|         cmnd = f"docker stop {c.split()[-1]}" |         cmnd = f"docker stop {c.split()[-1]}" | ||||||
|         status, running_containers = subprocess.getstatusoutput(cmnd) |         status, running_containers = subprocess.getstatusoutput(cmnd) | ||||||
| def restore_job(): | def restore_job(): | ||||||
|     logging.info(f'starting restore job') |  | ||||||
|     return 0 |  | ||||||
|     logging.info("Starting Restore") |     logging.info("Starting Restore") | ||||||
|     print("Starting Restore") |  | ||||||
|     now = datetime.datetime.now() |     now = datetime.datetime.now() | ||||||
|     STARTTIME = now.strftime("%Y-%m-%d_%H:%M:%S") |     STARTTIME = now.strftime("%Y-%m-%d_%H:%M:%S") | ||||||
|     if _APP == "all": |     if _APP == "all": | ||||||
| @@ -558,7 +555,7 @@ def backup_job(server): | |||||||
|                 stdout=subprocess.PIPE) |                 stdout=subprocess.PIPE) | ||||||
|         while process.poll() is None: |         while process.poll() is None: | ||||||
|             line = process.stdout.readline().decode("utf-8").split("/") |             line = process.stdout.readline().decode("utf-8").split("/") | ||||||
|             print(line[0]) |             #print(line[0]) | ||||||
|             if line[0] in apps: |             if line[0] in apps: | ||||||
|                 logging.info(f"Working on app {line[0]}") |                 logging.info(f"Working on app {line[0]}") | ||||||
|                 while True: |                 while True: | ||||||
| @@ -759,7 +756,9 @@ def backup_job(server): | |||||||
|     message= "finished1" |     message= "finished1" | ||||||
|     client.publish(topic, message,qos=2,retain=True) |     client.publish(topic, message,qos=2,retain=True) | ||||||
|     return 0 |     return 0 | ||||||
|  | if _RESTORE: | ||||||
|  |     restore_job() | ||||||
|  |     sys.exit() | ||||||
| if _SSH_TEST:                 | if _SSH_TEST:                 | ||||||
|     user = "root" |     user = "root" | ||||||
|     cmnd = "ls -la" |     cmnd = "ls -la" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user