minecraft-spigot/start.sh

17 lines
549 B
Bash
Raw Normal View History

2017-03-10 01:01:10 +01:00
#!/bin/bash
2017-03-10 10:01:48 +01:00
# check if spigot is alredy built
2017-03-10 01:01:10 +01:00
cd /usr/games/mcserv
if ls /usr/games/mcserv/spigot*.jar &> /dev/null
then
2017-03-10 10:01:48 +01:00
spigot_filename="$(ls -1 /usr/games/mcserv/spigot*.jar)"
echo "eula=true" > /usr/games/mcserv/eula.txt
java -Xms512M -Xmx1G -XX:MaxPermSize=128M -XX:+UseConcMarkSweepGC -jar "${spigot_filename}"
2017-03-10 01:01:10 +01:00
else
2017-03-10 10:01:48 +01:00
echo "spigot not built yet. rebuilding it"
wget -O /usr/games/mcserv/BuildTools.jar "https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar"
java -jar BuildTools.jar
2017-03-10 01:01:10 +01:00
fi