Add scripts for managing Azurite storage accounts

This commit is contained in:
2026-02-26 19:05:26 +01:00
parent 63f4daf7af
commit 27fb1a6211
2 changed files with 42 additions and 0 deletions

20
list-accounts.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
AZURITE_DIR="storage/azurite"
if [[ ! -d "$AZURITE_DIR" ]]; then
echo "No accounts found"
exit 0
fi
AZURITE_ACCOUNTS_FILE="$AZURITE_DIR/accounts.env"
. $AZURITE_ACCOUNTS_FILE
while IFS=';' read -ra ACCOUNTS; do
for ACCOUNT in "${ACCOUNTS[@]}"; do
IFS=':' read -ra KV <<< "$ACCOUNT"
echo "Account: ${KV[0]}"
echo "Password: $(echo -n "${KV[1]}")"
echo
done
done <<< "$AZURITE_ACCOUNTS"