Fix Minecraft backup script not handling new deployments

This commit is contained in:
Salt 2020-07-25 22:14:04 -05:00
parent 96857fdedd
commit 123c6a1a7b

View File

@ -13,6 +13,11 @@ set -e
export MINECRAFT_DIR="/var/minecraft/{{ mcname }}"
cd "$MINECRAFT_DIR" || exit 50
# Make sure we have a backup
if ! aws s3 ls "s3://{{ aws_backup_bucket }}/{{ mcname }}/" > /dev/null 2>&1; then
echo "No backups available"
exit 0
fi
# If the world directory exists, we need to ensure that we don't clobber it
if [ -d "world" ]; then
echo "Backing up current world"