aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--serverconf.sh4
1 files changed, 4 insertions, 0 deletions
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"