mirror of
https://gitlab.sectorq.eu/jaydee/omv_backup.git
synced 2025-07-01 15:48:33 +02:00
lala
This commit is contained in:
@ -311,6 +311,12 @@ if _RESTORE:
|
||||
cmnd = f"rsync -avz --delete {BACKUP_HOST}:{BACKUP_DEVICE}{NEW_BACKUP_DIR} {SOURCE_DIR}"
|
||||
ans = "y"
|
||||
print(cmnd)
|
||||
|
||||
if _TEST:
|
||||
ans = input("continue?") or "n"
|
||||
if ans == "y" and _EXECUTE:
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
|
||||
file = "/share/docker_data/homepage/config/widgets.yaml"
|
||||
with open(file, 'r') as stream:
|
||||
try:
|
||||
@ -325,17 +331,15 @@ if _RESTORE:
|
||||
|
||||
# Save it again
|
||||
print(f"writing to file {file}")
|
||||
with open("/tmp/lala", 'w') as stream:
|
||||
with open(file, 'w') as stream:
|
||||
try:
|
||||
yaml.dump(loaded, stream, default_flow_style=False)
|
||||
except yaml.YAMLError as exc:
|
||||
print("failed")
|
||||
print(exc)
|
||||
|
||||
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)
|
||||
|
Reference in New Issue
Block a user