From da5521295d74befcf35fded8c3e4afb3ff7f737d Mon Sep 17 00:00:00 2001 From: gyurix Date: Thu, 31 Jul 2025 11:45:19 +0200 Subject: [PATCH] Refactor entrypoint script to set installed version number and add debug mode handling for input directory --- scripts/scheduler/entrypoint.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/scheduler/entrypoint.sh b/scripts/scheduler/entrypoint.sh index bd74791..ed2ebd9 100644 --- a/scripts/scheduler/entrypoint.sh +++ b/scripts/scheduler/entrypoint.sh @@ -4,10 +4,6 @@ cd /scripts DEBUG_MODE=${DEBUG_MODE:-false} VERSION=1.1.0 -# Set installed version number -echo '{}' | jq --arg VERSION "$VERSION" '.VERSION = $VERSION' > /var/tmp/shared/output/version.json -############################ - #DOCKER_REGISTRY_URL=${DOCKER_REGISTRY_URL:-registry.format.hu} DOCKER_REGISTRY_URL=${DOCKER_REGISTRY_URL:-safebox} USER_INIT_PATH=$USER_INIT_PATH @@ -1496,7 +1492,13 @@ DATE=$(date +%F-%H-%M-%S) DIR=$SHARED/input # Triggers by certificate or domain config changes +# Set installed version number +echo '{}' | jq --arg VERSION "$VERSION" '.VERSION = $VERSION' > $SHARED/output/version.json +############################ +if [ "$DEBUG_MODE" == "true" ]; then + rm $DIR/* +fi unset IFS inotifywait --exclude "\.(swp|tmp)" -m -e CREATE,CLOSE_WRITE,DELETE,MOVED_TO -r $DIR |