28 lines
789 B
Bash
28 lines
789 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
set -e
|
||
|
|
||
|
setupServer(){
|
||
|
wget https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.12.2-14.23.5.2854/forge-1.12.2-14.23.5.2854-installer.jar
|
||
|
wget https://media.forgecdn.net/files/2935/323/RLCraft+Server+Pack+1.12.2+-+Beta+v2.8.2.zip
|
||
|
java -jar forge-1.12.2-14.23.5.2854-installer.jar --installServer
|
||
|
unzip RLCraft+Server+Pack+1.12.2+-+Beta+v2.8.2.zip -d .
|
||
|
rm forge-1.12.2-14.23.5.2854-installer.jar RLCraft+Server+Pack+1.12.2+-+Beta+v2.8.2.zip
|
||
|
echo "eula=true" > eula.txt
|
||
|
cp /stuff/server.properties /data/server.properties
|
||
|
}
|
||
|
|
||
|
startServer(){
|
||
|
java -jar forge-1.12.2-14.23.5.2854.jar nogui
|
||
|
}
|
||
|
|
||
|
if [ ! -f "/data/forge-1.12.2-14.23.5.2854.jar" ]; then
|
||
|
echo "Setting up server"
|
||
|
setupServer
|
||
|
fi
|
||
|
|
||
|
echo "start server"
|
||
|
startServer
|
||
|
|
||
|
|