[plane] Adjust ADMINPASS detection to work with recent provisioner changes

This commit is contained in:
Bernhard "bero" Rosenkränzer (Boggins) 2024-12-19 15:18:20 +01:00
parent 956b1bc597
commit 9c9d2fcd47

View File

@ -510,7 +510,7 @@ EOF
PROFILE_UUID=$(random xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
SIGNUP_UUID=$(random xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
TOKEN=$(random xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)
ADMINPASS=$(grep ADMINPASS= /var/lib/cloud/instances/[0-9]*/cloud-config.txt |cut -d= -f2- |tr -d \")
ADMINPASS=$(grep ADMINPASS= /var/lib/cloud/instances/[0-9]*/cloud-config.txt |cut -d= -f2- |cut -d'"' -f2 |tr -d '\\')
ENCODED_PASSWORD=$(python3 -c "from passlib.hash import django_pbkdf2_sha256; print(django_pbkdf2_sha256.hash('$ADMINPASS'))")
# FIXME don't hardcode 0.24.0
cat >/federated/apps/postgresql/data/var/lib/postgresql/data/plane-initial-user.sql <<EOF