update
Some checks failed
Deploy Minecraft Server / deploy (push) Failing after 1m25s
Ansible Lint / lint (push) Failing after 12s

This commit is contained in:
2025-08-26 14:28:09 +02:00
parent 0315edf95f
commit 31711c7627
105 changed files with 1419 additions and 366 deletions

View File

@@ -0,0 +1,18 @@
#!/bin/bash
OLD_VERSION="$1"
NEW_VERSION="$2"
SERVER_DIR="{{ minecraft_server_dir }}"
BACKUP_DIR="{{ minecraft_backups_dir }}/version_backup"
# Create backup directory
mkdir -p "${BACKUP_DIR}"
# Backup current version
mv "${SERVER_DIR}" "${BACKUP_DIR}/server_${OLD_VERSION}_$(date +%Y%m%d_%H%M%S)"
# Switch to new version
mv "${SERVER_DIR}_${NEW_VERSION}" "${SERVER_DIR}"
echo "Version switched from ${OLD_VERSION} to ${NEW_VERSION}"
exit 0