summaryrefslogtreecommitdiff
path: root/games-server/minecraft-server/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-08-08 20:11:47 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-08-08 20:11:47 +0100
commitf625b9919a60a30f1bd860f7d1b2eac183ced593 (patch)
tree7543f00925ff7277e31881de0a87801681f6f92f /games-server/minecraft-server/files
parente3872864be25f7421015bef2732fa57c0c9fb726 (diff)
gentoo resync : 08.08.2018
Diffstat (limited to 'games-server/minecraft-server/files')
-rw-r--r--games-server/minecraft-server/files/README.gentoo20
-rw-r--r--games-server/minecraft-server/files/minecraft-server-r1.initd (renamed from games-server/minecraft-server/files/minecraft-server.initd)9
2 files changed, 24 insertions, 5 deletions
diff --git a/games-server/minecraft-server/files/README.gentoo b/games-server/minecraft-server/files/README.gentoo
new file mode 100644
index 000000000000..ae8c62a9cbf2
--- /dev/null
+++ b/games-server/minecraft-server/files/README.gentoo
@@ -0,0 +1,20 @@
+This package provides an init script and a conf file.
+You don't have to modify those files directly,
+but instead you can make a symlink of that init script
+and a copy of that conf file.
+You would do this for every server, you want to setup.
+
+For example, you wan't to setup an world called 'gentoo',
+you would do:
+
+cd /etc/init.d
+ln -s minecraft-server minecraft-server.gentoo
+
+cd /etc/conf.d
+cp minecraft-server minecraft-server.gentoo
+
+After that, make your settings in
+/etc/conf.d/minecraft-server.gentoo.
+
+If you don't make a symlink, but use the default scripts,
+your world will be called 'main'.
diff --git a/games-server/minecraft-server/files/minecraft-server.initd b/games-server/minecraft-server/files/minecraft-server-r1.initd
index 630c88871d76..872885ecd643 100644
--- a/games-server/minecraft-server/files/minecraft-server.initd
+++ b/games-server/minecraft-server/files/minecraft-server-r1.initd
@@ -8,17 +8,16 @@ else
instance="${SVCNAME#minecraft-server.}"
fi
-java="${JAVA_HOME-/usr}"/bin/java
-minecraft_jar="/usr/share/games/minecraft-server/minecraft-server.jar"
+minecraft_command="/usr/bin/minecraft-server"
minecraft_logs="/var/log/minecraft-server"
minecraft_path="/var/lib/minecraft-server/${instance}"
name="Minecraft Server (World: ${instance})"
pidfile="/run/minecraft-server.${instance}.pid"
screen_name="minecraft-server.${instance}"
-start_stop_daemon_args="--chdir ${minecraft_path}"
+start_stop_daemon_args="--chdir ${minecraft_path} --env JAVA_OPTS=\"${MINECRAFT_OPTS}\""
command="screen"
-command_args="-DmUS ${screen_name} ${java} ${MINECRAFT_OPTS} -jar ${minecraft_jar}"
+command_args="-DmUS ${screen_name} ${minecraft_command}"
command_background="true"
command_group="minecraft"
command_user="minecraft"
@@ -36,7 +35,7 @@ start_pre() {
checkpath -d -o "${command_user}:${command_group}" -q "${minecraft_logs}"/"${instance}"
if [ ! -L "${minecraft_path}"/logs ]; then
- cd "$minecraft_path}" && ln -s ../../../log/minecraft-server/"${instance}" logs
+ cd "${minecraft_path}" && ln -s ../../../log/minecraft-server/"${instance}" logs
fi
if [ -z ${MINECRAFT_OPTS} ]; then