This commit is contained in:
jaydee
2024-12-17 00:21:28 +01:00
parent 8631b5a504
commit b58415e6e6

View File

@ -231,7 +231,21 @@ if _RESTORE:
status, output = subprocess.getstatusoutput(cmnd)
cmnd = "docker start heimdall"
status, output = subprocess.getstatusoutput(cmnd)
if app == "ha":
print("Stopping docker")
cmnd = "docker stop heimdall"
status, output = subprocess.getstatusoutput(cmnd)
cmnd = f"rsync -avz --delete rsync://{BACKUP_HOST}{NEW_BACKUP_DIR} {SOURCE_DIR}"
ans = "y"
print(cmnd)
print("Sync files")
if _TEST:
ans = input("continue?") or "n"
if ans == "y" and _EXECUTE:
status, output = subprocess.getstatusoutput(cmnd)
print("Start docker")
cmnd = "docker start heimdall"
status, output = subprocess.getstatusoutput(cmnd)
elif app == "nginx":
print("Stopping docker")
cmnd = "docker stop nginx-app-1"