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

1.14 Support #58

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
13 changes: 9 additions & 4 deletions ServerStart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ install_server(){
export MC_SERVER_URL="${MC_SERVER_FORGEURL}"
fi

command - v curl >> /dev/null 2>&1
command -v curl >> /dev/null 2>&1
if [[ $? == 0 ]]; then
echo "DEBUG: (curl) Downloading ${MC_SERVER_URL}" >>logs/serverstart.log 2>&1
curl -OJL "${MC_SERVER_URL}" >>logs/serverstart.log 2>&1
Expand Down Expand Up @@ -378,13 +378,18 @@ while $run ; do
echo "Required files not found, need to install Forge"
install_server
fi
forge=$(ls forge*"$MC_SERVER_MCVER"*"$MC_SERVER_FORGEVER"*universal.jar 2>>logs/serverstart.log)
if [[ $? != 0 ]] ; then
forge=("$(ls forge*"$MC_SERVER_MCVER"*"$MC_SERVER_FORGEVER"*.jar)") 2>>logs/serverstart.log 2>&1
for file in ${forge[0]}; do
if [[ "$file" != *"installer"* ]]; then
export MC_SERVER_FORGE_JAR="${file}"
break
fi
done
if [[ -z $MC_SERVER_FORGE_JAR ]] ; then
echo "WARN: no forge jar for MCVER: $MC_SERVER_MCVER and FORGEVER: $MC_SERVER_FORGEVER found" >>logs/serverstart.log
echo "Required files not found, need to install Forge"
install_server
else
export MC_SERVER_FORGE_JAR="${forge[0]}"
echo "DEBUG: Found forge jar: $MC_SERVER_FORGE_JAR" >>logs/serverstart.log
fi

Expand Down