From b237790f9670c336335d5a44dcacd5ea64f37d40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Levilain?= Date: Mon, 25 Mar 2024 11:01:18 +0100 Subject: [PATCH] fix(shulker-operator): add back fallbacks on init scripts --- packages/shulker-operator/assets/proxy-init-fs.sh | 4 ++-- packages/shulker-operator/assets/proxy-probe-readiness.sh | 1 + packages/shulker-operator/assets/server-init-fs.sh | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/shulker-operator/assets/proxy-init-fs.sh b/packages/shulker-operator/assets/proxy-init-fs.sh index ff2f10a9..acace9a8 100644 --- a/packages/shulker-operator/assets/proxy-init-fs.sh +++ b/packages/shulker-operator/assets/proxy-init-fs.sh @@ -12,14 +12,14 @@ else cp "${SHULKER_CONFIG_DIR}/bungeecord-config.yml" "${SHULKER_PROXY_DATA_DIR}/config.yml" fi -if [ ! -z "${SHULKER_PROXY_PLUGIN_URLS}" ]; then +if [ ! -z "${SHULKER_PROXY_PLUGIN_URLS:-}" ]; then mkdir -p "${SHULKER_PROXY_DATA_DIR}/plugins" for plugin_url in ${SHULKER_PROXY_PLUGIN_URLS//;/ }; do (cd "${SHULKER_PROXY_DATA_DIR}/plugins" && wget "${plugin_url}") done fi -if [ ! -z "${SHULKER_PROXY_PATCH_URLS}" ]; then +if [ ! -z "${SHULKER_PROXY_PATCH_URLS:-}" ]; then for patch_url in ${SHULKER_PROXY_PATCH_URLS//;/ }; do (cd "${SHULKER_PROXY_DATA_DIR}" && wget "${patch_url}" -O - | tar -xzv) done diff --git a/packages/shulker-operator/assets/proxy-probe-readiness.sh b/packages/shulker-operator/assets/proxy-probe-readiness.sh index 2741ec85..5686980d 100644 --- a/packages/shulker-operator/assets/proxy-probe-readiness.sh +++ b/packages/shulker-operator/assets/proxy-probe-readiness.sh @@ -1,4 +1,5 @@ #!/bin/sh + set -euo pipefail set -o xtrace diff --git a/packages/shulker-operator/assets/server-init-fs.sh b/packages/shulker-operator/assets/server-init-fs.sh index 3c6fe0d2..f51b10e9 100644 --- a/packages/shulker-operator/assets/server-init-fs.sh +++ b/packages/shulker-operator/assets/server-init-fs.sh @@ -10,18 +10,18 @@ if [ "${SHULKER_VERSION_CHANNEL}" == "Paper" ] || [ "${SHULKER_VERSION_CHANNEL}" cp "${SHULKER_CONFIG_DIR}/paper-global-config.yml" "${SHULKER_SERVER_CONFIG_DIR}/config/paper-global.yml" fi -if [ ! -z "${SERVER_WORLD_URL}" ]; then +if [ ! -z "${SERVER_WORLD_URL:-}" ]; then (cd "${SHULKER_SERVER_CONFIG_DIR}" && wget "${SERVER_WORLD_URL}" -O - | tar -xzv) fi -if [ ! -z "${SHULKER_SERVER_PLUGIN_URLS}" ]; then +if [ ! -z "${SHULKER_SERVER_PLUGIN_URLS:-}" ]; then mkdir -p "${SHULKER_SERVER_CONFIG_DIR}/plugins" for plugin_url in ${SHULKER_SERVER_PLUGIN_URLS//;/ }; do (cd "${SHULKER_SERVER_CONFIG_DIR}/plugins" && wget "${plugin_url}") done fi -if [ ! -z "${SHULKER_SERVER_PATCH_URLS}" ]; then +if [ ! -z "${SHULKER_SERVER_PATCH_URLS:-}" ]; then for patch_url in ${SHULKER_SERVER_PATCH_URLS//;/ }; do (cd "${SHULKER_SERVER_CONFIG_DIR}" && wget "${patch_url}" -O - | tar -xzv) done