diff --git a/Dockerfile b/Dockerfile index 813895f11..66fdf55af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.23.2-alpine AS rcon-cli_builder +FROM golang:1.23.3-alpine AS rcon-cli_builder ARG RCON_VERSION="0.10.3" ARG RCON_TGZ_SHA1SUM=33ee8077e66bea6ee097db4d9c923b5ed390d583 @@ -20,7 +20,7 @@ RUN wget -q https://github.com/gorcon/rcon-cli/archive/refs/tags/v${RCON_VERSION FROM cm2network/steamcmd:root AS base-amd64 # Ignoring --platform=arm64 as this is required for the multi-arch build to continue to work on amd64 hosts # hadolint ignore=DL3029 -FROM --platform=arm64 sonroyaalmerol/steamcmd-arm64:root-2024-10-20 AS base-arm64 +FROM --platform=arm64 sonroyaalmerol/steamcmd-arm64:root-2024-11-17 AS base-arm64 ARG TARGETARCH # Ignoring the lack of a tag here because the tag is defined in the above FROM lines diff --git a/scripts/restore.sh b/scripts/restore.sh index c179f36fa..e3ef52f22 100644 --- a/scripts/restore.sh +++ b/scripts/restore.sh @@ -109,6 +109,19 @@ if [ -f "$BACKUP_FILE" ]; then # Decompress the backup file in tmp directory tar -zxvf "$BACKUP_FILE" -C "$TMP_PATH" + # Find backup folders + mapfile -t backup_folders < <(find "$RESTORE_PATH" -name "backup" -type d | sed "s|^$RESTORE_PATH||") + + # Check if backup folder parents exist in restore + for backup_folder in "${backup_folders[@]}" + do + backup_folder_dirname=$( dirname "$backup_folder" ) + if [ -d "$TMP_PATH/$backup_folder_dirname" ]; then + # Move backup folder into restore + mv "$RESTORE_PATH/$backup_folder_dirname/backup" "$TMP_PATH/$backup_folder_dirname" + fi + done + # Make sure Saves with a different ID are removed before restoring the save rm -rf "$RESTORE_PATH/Saved/"