diff --git a/README.md b/README.md index 00bd8d3..76f22dd 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ docker create \ -e PUID=1000 \ -e PGID=1000 \ -e TZ=Europe/London \ + -e CLI_ARGS="--gameid minetest" `#optional` \ -p 30000:30000/udp \ -v :/config/.minetest \ --restart unless-stopped \ @@ -75,6 +76,7 @@ services: - PUID=1000 - PGID=1000 - TZ=Europe/London + - CLI_ARGS="--gameid minetest" #optional volumes: - :/config/.minetest ports: @@ -92,6 +94,7 @@ Container images are configured using parameters passed at runtime (such as thos | `-e PUID=1000` | for UserID - see below for explanation | | `-e PGID=1000` | for GroupID - see below for explanation | | `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London. | +| `-e CLI_ARGS="--gameid minetest"` | Optionally specify any [CLI variables](https://wiki.minetest.net/Command_line) you want to launch the app with | | `-v /config/.minetest` | Where minetest stores config files and maps etc. | ## User / Group Identifiers @@ -180,6 +183,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **03.06.19:** - Adding custom cli vars to options. * **23.03.19:** - Switching to new Base images, shift to arm32v7 tag. * **04.03.19:** - Rebase to alpine 3.9 to compile 5.0.0 minetest with new build args. * **14.01.19:** - Add pipeline logic and multi arch. diff --git a/readme-vars.yml b/readme-vars.yml index 496b534..1ebafdc 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -23,8 +23,6 @@ param_container_name: "{{ project_name }}" param_usage_include_net: false param_usage_include_env: true param_env_vars: - - { env_var: "GAMEID", env_value: "Europe/London", desc: "Specify a gameid to use." } - - { env_var: "WORLD", env_value: "Europe/London", desc: "Specify a world to use." } - { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London." } param_usage_include_vols: true param_volumes: @@ -36,12 +34,10 @@ param_device_map: false cap_add_param: false # optional container parameters -opt_param_usage_include_env: false -opt_param_usage_include_vols: false -opt_param_usage_include_ports: false -opt_param_device_map: false -opt_cap_add_param: false -optional_block_1: false +opt_param_usage_include_env: true +opt_param_env_vars: + - { env_var: "CLI_ARGS", env_value: "\"--gameid minetest\"", desc: "Optionally specify any [CLI variables](https://wiki.minetest.net/Command_line) you want to launch the app with" } + # application setup block app_setup_block_enabled: true @@ -53,8 +49,7 @@ app_setup_block: | https://hub.docker.com/r/linuxserver/{{ project_name }}/tags # changelog changelogs: - - - { date: "26.05.19:", desc: "Add GAMEID environmental variable and document WORLD environmental variable." } + - { date: "03.06.19:", desc: "Adding custom cli vars to options." } - { date: "23.03.19:", desc: "Switching to new Base images, shift to arm32v7 tag." } - { date: "04.03.19:", desc: "Rebase to alpine 3.9 to compile 5.0.0 minetest with new build args." } - { date: "14.01.19:", desc: "Add pipeline logic and multi arch." } diff --git a/root/etc/services.d/minetest/run b/root/etc/services.d/minetest/run index 4321bd9..1b2db04 100644 --- a/root/etc/services.d/minetest/run +++ b/root/etc/services.d/minetest/run @@ -1,28 +1,5 @@ #!/usr/bin/with-contenv bash -# predefine some variables -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 -WORLD_STRING=" " -else -WORLD_STRING=$WORLD_PART$WORLD_SET -fi - -# set GAMEID_STRING variable to use user-defined Gameid. -if [ -z "$GAMEID" ]; then -GAMEID_STRING=" " -else -GAMEID_STRING=$GAMEID_PART$GAMEID_SET -fi - -# shellcheck disable=SC2086 exec \ - s6-setuidgid abc minetestserver $WORLD_STRING $GAMEID_STRING \ + s6-setuidgid abc minetestserver "${CLI_ARGS}" \ --config /config/.minetest/main-config/minetest.conf --port 30000