From 4c66ee38baecf0c88fe6e63fd4e641035f2f05ae Mon Sep 17 00:00:00 2001 From: Slawomir Koszewski Date: Tue, 24 Mar 2026 09:31:46 +0100 Subject: [PATCH] fix: move account name lookup above certificate check in entrypoint.sh --- entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index a76281f..1b991d6 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -14,15 +14,15 @@ if [[ -z "$AZURITE_ACCOUNTS" ]]; then fi fi +# Look up the account name from the AZURITE_ACCOUNTS variable, which is in the format "accountName:accountKey1:accountKey2;accountName2:accountKey1:accountKey2" +ACCOUNT_NAME=$(echo "$AZURITE_ACCOUNTS" | cut -f 1 -d ';' | cut -f 1 -d ':') + # Check, if the certificate for the account exists. if [[ ! -f "/storage/${ACCOUNT_NAME}_cert.pem" ]] || [[ ! -f "/storage/${ACCOUNT_NAME}_key.pem" ]]; then echo "[ERROR] Certificate or key for account ${ACCOUNT_NAME} not found." exit 1 fi -# Look up the account name from the AZURITE_ACCOUNTS variable, which is in the format "accountName:accountKey1:accountKey2;accountName2:accountKey1:accountKey2" -ACCOUNT_NAME=$(echo "$AZURITE_ACCOUNTS" | cut -f 1 -d ';' | cut -f 1 -d ':') - OAUTH_ARGS=("--oauth" "basic") NO_CADDY=