Fix Minecraft backup script not handling new deployments
This commit is contained in:
parent
96857fdedd
commit
123c6a1a7b
@ -13,6 +13,11 @@ set -e
|
|||||||
export MINECRAFT_DIR="/var/minecraft/{{ mcname }}"
|
export MINECRAFT_DIR="/var/minecraft/{{ mcname }}"
|
||||||
cd "$MINECRAFT_DIR" || exit 50
|
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 the world directory exists, we need to ensure that we don't clobber it
|
||||||
if [ -d "world" ]; then
|
if [ -d "world" ]; then
|
||||||
echo "Backing up current world"
|
echo "Backing up current world"
|
||||||
|
Loading…
Reference in New Issue
Block a user