From 82185b89dc6c25d7287a8c6a6df29a6a0d55e46e Mon Sep 17 00:00:00 2001 From: John Date: Sun, 27 Apr 2025 20:22:00 +1200 Subject: [PATCH] Working on restore. --- templates/example-nginx/restore.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/example-nginx/restore.sh b/templates/example-nginx/restore.sh index bad718d..d816bd4 100644 --- a/templates/example-nginx/restore.sh +++ b/templates/example-nginx/restore.sh @@ -20,15 +20,15 @@ if [ ! -f "$BACKUP_FILE" ]; then fi # # Stop container before backup - _remove_container "$CONTAINER_NAME" -_is_container_running || die "Couldn't stop existing container" -_is_container_exists || die "Couldn't remove existing container" +bash ./uninstall.sh || die "Failed to uninstall service before restore" + +_is_container_running && die "Container still running after uninstall" +_is_container_exists && die "Container still exists after uninstall" # Remove existing data folder echo "Deleting ALL data in $LOCAL_DATA_FOLDER." rm -rf "$LOCAL_DATA_FOLDER" [ ! -d "$LOCAL_DATA_FOLDER" ] || die "Failed to delete $LOCAL_DATA_FOLDER" - mkdir -p "$LOCAL_DATA_FOLDER" [ -d "$LOCAL_DATA_FOLDER" ] || die "Failed to create $LOCAL_DATA_FOLDER"