Fix world packing

This commit is contained in:
h3lp
2026-03-14 01:11:24 +02:00
parent 62d2e1fcd2
commit 96b493f8ba
2 changed files with 10 additions and 1 deletions
+9 -1
View File
@@ -9,7 +9,15 @@ java -Xmx${MEMORY_MAX}M -Xms${MEMORY_MIN}M -jar minecraft_server.jar nogui
read -rp "Pack and publish world? [y/N] " answer
if [[ "$answer" =~ ^[Yy]$ ]]; then
/home/h3lp/mineserver/packworld.sh
set -e
WORLD=/home/h3lp/mineserver/world
OUTPUT=/var/www/hostedfiles/world.tar.xz
TMP=$(mktemp)
tar -cJf "$TMP" -C "$WORLD" .
mv "$TMP" "$OUTPUT"
chmod 644 "$OUTPUT"
echo "Done: $OUTPUT"
set +e
fi
read -rp "Press Enter to continue..."
+1
View File
@@ -11,5 +11,6 @@ TMP=$(mktemp)
tar -cJf "$TMP" -C "$WORLD" .
mv "$TMP" "$OUTPUT"
chmod 644 "$OUTPUT"
echo "Done: $OUTPUT"