Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding pack.cfg #55

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/DELETEME
/libraries
/logs
*.jar
*.log
*.txt
14 changes: 14 additions & 0 deletions ServerStart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions pack.cfg
Original file line number Diff line number Diff line change
@@ -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
8 changes: 1 addition & 7 deletions settings.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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