From 8552d6666cf98cf1dbc4fd9887ab5d546fd13bde Mon Sep 17 00:00:00 2001 From: fithwum <34775371+fithwum@users.noreply.github.com> Date: Mon, 13 Jul 2020 15:28:16 -0700 Subject: [PATCH] Update Install_Script.sh --- files/Install_Script.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/files/Install_Script.sh b/files/Install_Script.sh index 64bedcb..8a1d162 100644 --- a/files/Install_Script.sh +++ b/files/Install_Script.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2018 fithwum +# Copyright (c) 2020 fithwum # All rights reserved # Variables. @@ -54,6 +54,20 @@ else fi fi +# Set Server WORLD-NAME +if [ ! -f /MCserver/server.properties ]; then + : +else + if [ "${WORLD_NAME}" == "world" ]; then + if grep -rq 'level-name=${WORLD_NAME}' /MCserver/server.properties; then + sed -i '/level-name=${WORLD_NAME}/c\level-name=${WORLD_NAME}' /MCserver/server.properties + fi + echo " " + echo "WARNING ! WORLD_NAME not set, you must set the WORLD_NAME" + sleep 5 + fi +fi + sleep 1 if [ ! -f /MCserver/eula.txt ]; then