From 023a18b1d150fc9c09bf6ac135663f7ddce3b757 Mon Sep 17 00:00:00 2001 From: TheMightyV Date: Sun, 2 Jan 2022 20:15:48 +0100 Subject: fallback world name to server.properties --- serverconf.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/serverconf.sh b/serverconf.sh index a73a65d..3748541 100644 --- a/serverconf.sh +++ b/serverconf.sh @@ -12,6 +12,10 @@ TMUX_WINDOW="minecraft" TMUX_SOCKET="mc_tmux_socket" WORLD_NAME="lfja" +if [ -f "server.properties" ]; then + WORLD_NAME=$(grep level-name server.properties | cut -d= -f2) + echo "Getting world name from server.properties: $WORLD_NAME" +fi BACKUP_NAME="${WORLD_NAME}_backup" LOGFILE="logs/latest.log" -- cgit v1.2.3