diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2c6685f --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +/DELETEME +/libraries +/logs +*.jar +*.log +*.txt \ No newline at end of file diff --git a/ServerStart.sh b/ServerStart.sh index c09bd4a..0dac8d1 100755 --- a/ServerStart.sh +++ b/ServerStart.sh @@ -186,6 +186,20 @@ else echo "WARN: Failed to find settings.cfg" >>logs/serverstart.log fi +if [ -f ./pack.cfg ]; then + #Read the pack config file line by line + while IFS=$'\n\r' read -r line || [[ -n "$line" ]]; do + #Fliters out comments and empty lines + if [[ ${line:0:1} != ';' ]] && [[ $line = *[!\ ]* ]]; then + var="MC_SERVER_"$(echo "$line" | cut -d '=' -f 1) + value=$(echo "$line" | cut -d '=' -f 2-) + export "$var"="$value" + fi + done < ./pack.cfg +else + echo "WARN: Failed to find pack.cfg" >>logs/serverstart.log +fi + while :; do case $1 in -a|--auto) export MC_SERVER_AUTO_RESPOND=1 diff --git a/pack.cfg b/pack.cfg new file mode 100644 index 0000000..89df90b --- /dev/null +++ b/pack.cfg @@ -0,0 +1,5 @@ +MODPACK_NAME=All The Mods 3 Remix +DEFAULT_WORLD_TYPE=BIOMESOP +MCVER=1.14.4 +FORGEVER=14.23.5.2811 +FORGEURL=DISABLE \ No newline at end of file diff --git a/settings.cfg b/settings.cfg index 422c2f0..f42a299 100644 --- a/settings.cfg +++ b/settings.cfg @@ -18,10 +18,4 @@ HIGH_CPU_PRIORITY=0 JMX_ENABLE=0 JMX_PORT=9010 -JMX_HOST=127.0.0.1 - -MODPACK_NAME=All The Mods 3 Remix -DEFAULT_WORLD_TYPE=BIOMESOP -MCVER=1.12.2 -FORGEVER=14.23.5.2811 -FORGEURL=DISABLE +JMX_HOST=127.0.0.1 \ No newline at end of file