minecraft-forge/entrypoint.sh
Paul 0d7e5e2e52 Initial commit
The files were ported over from the old repository at
https://git.zom.bi/zombi-systems/dockerfiles/-/tree/master/games/forge-modbase
originally written by LOD, steffen and madmaurice.
2020-08-12 16:50:47 +02:00

25 lines
668 B
Bash

#!/bin/bash
# rmln links dest to target, but removes the target if it already exists.
rmln() {
dest=$1
target=$2
[ -e "$target" ] && rm -rf "$target"
ln -s "$dest" "$target"
}
rmln "$INSTDIR/forge.jar" "$RUNDIR/forge.jar"
rmln "$INSTDIR/libraries" "$RUNDIR/libraries"
rmln "$INSTDIR/minecraft_server.$MineVers.jar" "$RUNDIR/minecraft_server.$MineVers.jar"
rmln "$INSTDIR/eula.txt" "$RUNDIR/eula.txt"
( echo "MINECRAFT=${MINECRAFT}"; echo "FORGE=${FORGE}" ) > $RUNDIR/version.info
chown forge:forge "$RUNDIR"
cd $RUNDIR
exec su forge -c "/usr/bin/java -jar $RUNDIR/forge.jar"