From 9ddaca11d76cb3b04929249d1281df385570c77f Mon Sep 17 00:00:00 2001 From: chbmb Date: Sun, 26 May 2019 21:48:01 +0100 Subject: [PATCH] Update run --- root/etc/services.d/minetest/run | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/root/etc/services.d/minetest/run b/root/etc/services.d/minetest/run index c80e621..4ad50dc 100644 --- a/root/etc/services.d/minetest/run +++ b/root/etc/services.d/minetest/run @@ -1,9 +1,12 @@ #!/usr/bin/with-contenv bash # predefine some variables -world_part="--world " +world_part="--worldname " +gameid_part="--gameid " + # shellcheck disable=SC2154 world_set=$world +gameid_set=$gameid # set world_string variable to use user-defined world or default world. if [ -z "$world" ]; then @@ -12,7 +15,14 @@ else world_string=$world_part$world_set fi +# set world_string variable to use user-defined world or default world. +if [ -z "$gameid" ]; then +gameid_string=" " +else +gameid_string=$gameid_part$gameid_set +fi + # shellcheck disable=SC2086 exec \ - s6-setuidgid abc minetestserver $world_string \ + s6-setuidgid abc minetestserver $world_string $gameid_string \ --config /config/.minetest/main-config/minetest.conf --port 30000