This commit is contained in:
2025-08-26 13:35:58 +02:00
parent 1714817673
commit 8e9e915cdc

View File

@@ -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"