Fix world packing
This commit is contained in:
@@ -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
|
read -rp "Pack and publish world? [y/N] " answer
|
||||||
if [[ "$answer" =~ ^[Yy]$ ]]; then
|
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
|
fi
|
||||||
|
|
||||||
read -rp "Press Enter to continue..."
|
read -rp "Press Enter to continue..."
|
||||||
|
|||||||
@@ -11,5 +11,6 @@ TMP=$(mktemp)
|
|||||||
|
|
||||||
tar -cJf "$TMP" -C "$WORLD" .
|
tar -cJf "$TMP" -C "$WORLD" .
|
||||||
mv "$TMP" "$OUTPUT"
|
mv "$TMP" "$OUTPUT"
|
||||||
|
chmod 644 "$OUTPUT"
|
||||||
|
|
||||||
echo "Done: $OUTPUT"
|
echo "Done: $OUTPUT"
|
||||||
|
|||||||
Reference in New Issue
Block a user