(Personal memo) To build / upgrade / run Spigot on Gentoo linux.
cd /opt/Bukkit
wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
java -jar BuildTools.jar --rev latest
/etc/init.d/spigot-server.fktn-spigot stop
cp -a spigot-n.n.n.jar spigot-server.jar
cd /var/lib/spigot-server/fktn-spigot
java -jar /opt/Bukkit/spigot-server.jar --forceUpgrade
---wait for a while---
> stop
chown minecraft:minecraft logs/*
/etc/init.d/spigot-server.fktn-spigot start
Reuse scripts from games-server/minecraft-server as much as possible.
# cp -a /etc/init.d/minecraft-server /etc/init.d/spigot-server
And update the file as below.
# diff -Naur /etc/init.d/minecraft-server /etc/init.d/spigot-server
--- /etc/init.d/minecraft-server 2020-02-22 02:55:43.455930529 +0900
+++ /etc/init.d/spigot-server 2020-03-11 00:35:34.772524254 +0900
@@ -2,20 +2,20 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-if [ "${SVCNAME}" = "minecraft-server" ]; then
+if [ "${SVCNAME}" = "spigot-server" ]; then
instance="main"
else
- instance="${SVCNAME#minecraft-server.}"
+ instance="${SVCNAME#spigot-server.}"
fi
dtach_tmpfile="$(mktemp -u)"
-minecraft_command="/usr/bin/minecraft-server"
-minecraft_logs="/var/log/minecraft-server"
+minecraft_command="/opt/Bukkit/spigot-server"
+minecraft_logs="/var/log/spigot-server"
minecraft_logs_instance="${minecraft_logs}/${instance}"
-minecraft_path="/var/lib/minecraft-server"
+minecraft_path="/var/lib/spigot-server"
minecraft_path_instance="${minecraft_path}/${instance}"
-name="Minecraft Server (World: ${instance})"
-pidfile="/run/minecraft-server.${instance}.pid"
+name="Minecraft Spigot Server (World: ${instance})"
+pidfile="/run/spigot-server.${instance}.pid"
start_stop_daemon_args="--chdir ${minecraft_path_instance} --env JAVA_OPTS='${MINECRAFT_OPTS}'"
command="/usr/bin/dtach"
@@ -37,11 +37,11 @@
checkpath -d -o "${command_user}:${command_group}" -q "${minecraft_logs}" "${minecraft_logs_instance}"
if [ ! -L "${minecraft_path_instance}"/logs ]; then
- cd "${minecraft_path_instance}" && ln -s ../../../log/minecraft-server/"${instance}" logs
+ cd "${minecraft_path_instance}" && ln -s ../../../log/spigot-server/"${instance}" logs
fi
if [ -z "${MINECRAFT_OPTS}" ]; then
- eerror "You must define MINECRAFT_OPTS in /etc/conf.d/minecraft.${SVCNAME}!"
+ eerror "You must define MINECRAFT_OPTS in /etc/conf.d/spigot.${SVCNAME}!"
return 1
fi
}
A command "gjl" seeks necessary information from below directory.
# cp -a /usr/share/minecraft-server /usr/share/spigot-server
And update one of the files as below.
# diff -Naur /usr/share/minecraft-server /usr/share/spigot-server
diff -Naur /usr/share/minecraft-server/package.env /usr/share/spigot-server/package.env
--- /usr/share/minecraft-server/package.env 2020-02-22 02:55:43.302931767 +0900
+++ /usr/share/spigot-server/package.env 2020-03-11 01:04:13.044330434 +0900
@@ -3,7 +3,7 @@
SLOT="0"
CATEGORY="games-server"
PVR="1.15.2"
-CLASSPATH="//usr/share/minecraft-server/lib/minecraft-server.jar"
+CLASSPATH="//opt/Bukkit/spigot-server.jar"
VM=">=virtual/jre-1.8"
TARGET="1.8"
SOURCE="1.8"
0 件のコメント:
コメントを投稿