mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-14 06:12:27 +00:00
Merge branch 'master' into mc_fixes
This commit is contained in:
commit
532c9fa69a
1 changed files with 20 additions and 6 deletions
|
@ -156,6 +156,9 @@ function installForge {
|
||||||
FORGE_INSTALLER="/tmp/forge-$shortForgeVersion-installer.jar"
|
FORGE_INSTALLER="/tmp/forge-$shortForgeVersion-installer.jar"
|
||||||
elif [[ -z $FORGE_INSTALLER ]]; then
|
elif [[ -z $FORGE_INSTALLER ]]; then
|
||||||
FORGE_INSTALLER="/tmp/forge-installer.jar"
|
FORGE_INSTALLER="/tmp/forge-installer.jar"
|
||||||
|
elif [[ ! -e $FORGE_INSTALLER ]]; then
|
||||||
|
echo "ERROR: the given Forge installer doesn't exist : $FORGE_INSTALLER"
|
||||||
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
installMarker=".forge-installed-$shortForgeVersion"
|
installMarker=".forge-installed-$shortForgeVersion"
|
||||||
|
@ -185,13 +188,13 @@ function installForge {
|
||||||
else
|
else
|
||||||
echo "Downloading $FORGE_INSTALLER_URL ..."
|
echo "Downloading $FORGE_INSTALLER_URL ..."
|
||||||
if ! curl -o $FORGE_INSTALLER -fsSL $FORGE_INSTALLER_URL; then
|
if ! curl -o $FORGE_INSTALLER -fsSL $FORGE_INSTALLER_URL; then
|
||||||
echo "Failed to download from specification location $FORGE_INSTALLER_URL"
|
echo "Failed to download from given location $FORGE_INSTALLER_URL"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Installing Forge $shortForgeVersion"
|
echo "Installing Forge $shortForgeVersion using $FORGE_INSTALLER"
|
||||||
mkdir -p mods
|
mkdir -p mods
|
||||||
tries=3
|
tries=3
|
||||||
while ((--tries >= 0)); do
|
while ((--tries >= 0)); do
|
||||||
|
@ -206,8 +209,19 @@ function installForge {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# NOTE $shortForgeVersion will be empty if installer location was given to us
|
# NOTE $shortForgeVersion will be empty if installer location was given to us
|
||||||
SERVER=$(ls *forge*$shortForgeVersion*.jar)
|
echo "Finding installed server jar..."
|
||||||
if [ -z $SERVER ]; then
|
for j in *forge*.jar; do
|
||||||
|
echo "...$j"
|
||||||
|
case $j in
|
||||||
|
*installer*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
SERVER=$j
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
if [[ -z $SERVER ]]; then
|
||||||
echo "Unable to derive server jar for Forge"
|
echo "Unable to derive server jar for Forge"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
@ -541,10 +555,10 @@ fi
|
||||||
|
|
||||||
# Make sure files exist to avoid errors
|
# Make sure files exist to avoid errors
|
||||||
if [ ! -e banned-players.json ]; then
|
if [ ! -e banned-players.json ]; then
|
||||||
echo '' > banned-players.json
|
echo '[]' > banned-players.json
|
||||||
fi
|
fi
|
||||||
if [ ! -e banned-ips.json ]; then
|
if [ ! -e banned-ips.json ]; then
|
||||||
echo '' > banned-ips.json
|
echo '[]' > banned-ips.json
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If any modules have been provided, copy them over
|
# If any modules have been provided, copy them over
|
||||||
|
|
Loading…
Reference in a new issue