From 1f4290fcd323ce851ec7cc82fde0cf3d1d953799 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 20 Jul 2016 18:05:31 +0200 Subject: [PATCH] add java config vars --- rootfs/etc/confd/conf.d/run.toml | 4 ++++ rootfs/etc/confd/templates/run.tmpl | 4 ++++ rootfs/etc/confd/templates/server.properties.tmpl | 3 ++- rootfs/etc/services.d/minecraft/run | 4 ---- 4 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 rootfs/etc/confd/conf.d/run.toml create mode 100644 rootfs/etc/confd/templates/run.tmpl delete mode 100644 rootfs/etc/services.d/minecraft/run diff --git a/rootfs/etc/confd/conf.d/run.toml b/rootfs/etc/confd/conf.d/run.toml new file mode 100644 index 0000000..6b8d0db --- /dev/null +++ b/rootfs/etc/confd/conf.d/run.toml @@ -0,0 +1,4 @@ +[template] +src = "run.tmpl" +dest = "/etc/services.d/minecraft/run" +mode = "0750" \ No newline at end of file diff --git a/rootfs/etc/confd/templates/run.tmpl b/rootfs/etc/confd/templates/run.tmpl new file mode 100644 index 0000000..d03f353 --- /dev/null +++ b/rootfs/etc/confd/templates/run.tmpl @@ -0,0 +1,4 @@ +#!/usr/bin/with-contenv sh + +cd /var/lib/bungeecord +exec s6-setuidgid bungeecord java -Xms{{getenv "MIN_RAM"}} -Xmx{{getenv "MAX_RAM" }} -jar /var/lib/bungeecord/bungeecord.jar diff --git a/rootfs/etc/confd/templates/server.properties.tmpl b/rootfs/etc/confd/templates/server.properties.tmpl index 2de70f9..9fca32b 100644 --- a/rootfs/etc/confd/templates/server.properties.tmpl +++ b/rootfs/etc/confd/templates/server.properties.tmpl @@ -30,4 +30,5 @@ max-players={{getenv "MAX_PLAYERS"}} spawn-monsters={{getenv "SPAWN_MONSTERS"}} generate-structures={{getenv "GENERATE_STRUCTURES"}} view-distance={{getenv "VIEW_DISTANCE"}} -motd={{getenv "MOTD"}} \ No newline at end of file +motd={{getenv "MOTD"}} +server-name={{getenv "SERVER_NAME"}} \ No newline at end of file diff --git a/rootfs/etc/services.d/minecraft/run b/rootfs/etc/services.d/minecraft/run deleted file mode 100644 index 7ed2ee6..0000000 --- a/rootfs/etc/services.d/minecraft/run +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/with-contenv sh - -cd /var/lib/minecraft -exec s6-setuidgid minecraft java -jar /var/lib/minecraft/spigot.jar