diff --git a/README.md b/README.md index 2ce5a4b..155644d 100644 --- a/README.md +++ b/README.md @@ -486,6 +486,7 @@ services: - './data/:/data/:rw' environment: # system parameters + DEBUG_ENTRYPOINT: 0 DISABLE_COLORS: 0 DISABLE_SUMMARY: 0 TZ: UTC @@ -634,6 +635,7 @@ exclusive to the system. | Name | Image | Default | Description | | ------------------------- | ------------------------ | --------- | --------------------------------------------------------- | +| `DEBUG_ENTRYPOINT` | `official` | `0` | Toggles debug messages in the entrypoint | | `DISABLE_COLORS` | `official` | `0` | Toggles colored output | | `DISABLE_SUMMARY` | `official` | `0` | Toggles configurations summary before starting the server | | `TERRARIA_TSHOCK_VERSION` | `tshock` | `5.2.0` | Shows [TShock] version | diff --git a/official/Dockerfile b/official/Dockerfile index 95f74af..8b491ac 100644 --- a/official/Dockerfile +++ b/official/Dockerfile @@ -5,6 +5,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG TERRARIA_VERSION="1.4.4.9" ENV TERRARIA_VERSION="${TERRARIA_VERSION}" +ENV DEBUG_ENTRYPOINT=0 ENV DISABLE_COLORS=0 ENV DISABLE_SUMMARY=0 ENV TZ="UTC" diff --git a/official/docker-compose.yml b/official/docker-compose.yml index 8e961d4..e6f22ff 100644 --- a/official/docker-compose.yml +++ b/official/docker-compose.yml @@ -11,6 +11,7 @@ services: - './data/:/data/:rw' environment: # system parameters + DEBUG_ENTRYPOINT: 0 DISABLE_COLORS: 0 DISABLE_SUMMARY: 0 TZ: UTC diff --git a/official/entrypoint/entrypoint.sh b/official/entrypoint/entrypoint.sh index 78f5dd0..81f2377 100755 --- a/official/entrypoint/entrypoint.sh +++ b/official/entrypoint/entrypoint.sh @@ -23,7 +23,7 @@ args="-config $config" binary_basename="$(basename $binary)" capture_input_pid='' capture_output_pid='' -debug=0 +debug="$DEBUG_ENTRYPOINT" journey_permissions='journeypermission_biomespread_setfrozen journeypermission_godmode journeypermission_increaseplacementrange @@ -105,13 +105,13 @@ unlock() { } debug_echo() { - if [ "$debug" -eq 1 ]; then + if [ "$debug" = '1' ]; then echo "$@" fi } debug_printf() { - if [ "$debug" -eq 1 ]; then + if [ "$debug" = '1' ]; then # shellcheck disable=SC2059 printf "$@" fi @@ -439,7 +439,7 @@ capture_output() { } cleanup() { - if [ "$debug" -eq 1 ]; then + if [ "$debug" = '1' ]; then lock fi @@ -471,7 +471,7 @@ cleanup() { wait "$capture_input_pid" wait "$capture_output_pid" - if [ "$debug" -eq 1 ]; then + if [ "$debug" = '1' ]; then unlock fi