2020-08-12 16:50:47 +02:00
|
|
|
#!/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
|
|
|
|
|
2020-08-22 17:00:56 +02:00
|
|
|
exec su forge -c "java -jar $RUNDIR/forge.jar"
|
2020-08-12 16:50:47 +02:00
|
|
|
|