summaryrefslogtreecommitdiff
path: root/verify_minio.sh
diff options
context:
space:
mode:
authordoc <doc@filenotfound.org>2025-06-30 20:11:52 +0000
committerdoc <doc@filenotfound.org>2025-06-30 20:11:52 +0000
commit41e897f4945aaf8fbcdf0b12ac2f08c5e6ae0458 (patch)
treedb7c3520fd91abc3cf56b1a52095d23f3a80d059 /verify_minio.sh
commit of legacy codeHEADmaster
Diffstat (limited to 'verify_minio.sh')
-rwxr-xr-xverify_minio.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/verify_minio.sh b/verify_minio.sh
new file mode 100755
index 0000000..affe981
--- /dev/null
+++ b/verify_minio.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+set -euo pipefail
+
+# CONFIG
+ZFS_PATH="/assets/"
+MINIO_USER="minio-user"
+EXPECTED_BUCKETS=(
+ "assets_azuracast"
+ "assets_archives"
+ "assets_genesisassets"
+ "assets_genesislibrary"
+ "assets_mastodon"
+ "assets_teamtalkdata"
+)
+
+echo "=== Verifying ZFS MinIO Layout in $ZFS_PATH ==="
+
+for BUCKET in "${EXPECTED_BUCKETS[@]}"; do
+ BUCKET_PATH="$ZFS_PATH/$BUCKET"
+ echo "- Checking: $BUCKET_PATH"
+
+ if [ -d "$BUCKET_PATH" ]; then
+ echo " ✅ Exists"
+ OWNER=$(stat -c '%U' "$BUCKET_PATH")
+ if [ "$OWNER" == "$MINIO_USER" ]; then
+ echo " ✅ Ownership correct: $OWNER"
+ else
+ echo " ❌ Ownership incorrect: $OWNER"
+ fi
+ else
+ echo " ❌ Missing bucket directory!"
+ fi
+done
+
+echo ""
+echo "If MinIO is already running, run the following to confirm bucket visibility:"
+echo " mc alias set local http://localhost:9000 genesisadmin MutationXv3!"
+echo " mc ls local/"