From 6acec51a27bf07e6468054ad67decc4443d07a00 Mon Sep 17 00:00:00 2001 From: Dennis Gaida <2392217+DennisGaida@users.noreply.github.com> Date: Fri, 10 Oct 2025 14:43:30 +0200 Subject: replace -f with -r and warning message update --- .docker/app/startup.sh | 5 ++--- .docker/app/update.sh | 5 ++--- .docker/app/updater.sh | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.docker/app/startup.sh b/.docker/app/startup.sh index 72ee24f80..fd2e92f97 100644 --- a/.docker/app/startup.sh +++ b/.docker/app/startup.sh @@ -27,13 +27,12 @@ for VAR in $(printenv | awk -F= '{print $1}'); do echo "warning: Both $ENV_VAR and $VAR are set. $VAR will override $ENV_VAR." fi - if [[ -f "$ENV_FILE_NAME" ]]; then + if [[ -r "$ENV_FILE_NAME" ]]; then VALUE="$(cat "$ENV_FILE_NAME")" export "$ENV_VAR"="$VALUE" echo "$ENV_VAR environment variable was set by secret file $ENV_FILE_NAME" else - echo "warning: Secret file $ENV_FILE_NAME for $VAR does not exist or is not a regular file." - + echo "warning: Secret file $ENV_FILE_NAME for $VAR is not readable or does not exist." fi fi done diff --git a/.docker/app/update.sh b/.docker/app/update.sh index 5c056f0d2..4c89a7efc 100644 --- a/.docker/app/update.sh +++ b/.docker/app/update.sh @@ -22,13 +22,12 @@ for VAR in $(printenv | awk -F= '{print $1}'); do echo "warning: Both $ENV_VAR and $VAR are set. $VAR will override $ENV_VAR." fi - if [[ -f "$ENV_FILE_NAME" ]]; then + if [[ -r "$ENV_FILE_NAME" ]]; then VALUE="$(cat "$ENV_FILE_NAME")" export "$ENV_VAR"="$VALUE" echo "$ENV_VAR environment variable was set by secret file $ENV_FILE_NAME" else - echo "warning: Secret file $ENV_FILE_NAME for $VAR does not exist or is not a regular file." - + echo "warning: Secret file $ENV_FILE_NAME for $VAR is not readable or does not exist." fi fi done diff --git a/.docker/app/updater.sh b/.docker/app/updater.sh index 78cc415c8..5d4d183b8 100644 --- a/.docker/app/updater.sh +++ b/.docker/app/updater.sh @@ -21,13 +21,12 @@ for VAR in $(printenv | awk -F= '{print $1}'); do echo "warning: Both $ENV_VAR and $VAR are set. $VAR will override $ENV_VAR." fi - if [[ -f "$ENV_FILE_NAME" ]]; then + if [[ -r "$ENV_FILE_NAME" ]]; then VALUE="$(cat "$ENV_FILE_NAME")" export "$ENV_VAR"="$VALUE" echo "$ENV_VAR environment variable was set by secret file $ENV_FILE_NAME" else - echo "warning: Secret file $ENV_FILE_NAME for $VAR does not exist or is not a regular file." - + echo "warning: Secret file $ENV_FILE_NAME for $VAR is not readable or does not exist." fi fi done -- cgit v1.2.3-54-g00ecf