fix: add check for existence of account certificate and key in entrypoint.sh
This commit is contained in:
@@ -14,6 +14,12 @@ if [[ -z "$AZURITE_ACCOUNTS" ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# 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"
|
# 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 ':')
|
ACCOUNT_NAME=$(echo "$AZURITE_ACCOUNTS" | cut -f 1 -d ';' | cut -f 1 -d ':')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user