Fix Pandora password hash generation

This commit is contained in:
Disassembler 2019-12-20 08:55:31 +01:00
parent d08848a4d0
commit 18698ef5d4
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499

View File

@ -45,7 +45,7 @@ lxc-execute pandora -- /srv/pandora/pandora/manage.py sync_documentsort
export PANDORA_ADMIN_USER=admin
export PANDORA_ADMIN_EMAIL=admin@example.com
export PANDORA_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=')
export PANDORA_ADMIN_HASH=$(lxc-execute pandora -- sh -c "DJANGO_SETTINGS_MODULE=srv.pandora.pandora.settings python3 -c \"from django.contrib.auth.hashers import make_password; print(make_password('${PANDORA_ADMIN_PWD}'))\"")
export PANDORA_ADMIN_HASH=$(lxc-execute pandora -- sh -c "cd /srv/pandora && DJANGO_SETTINGS_MODULE=pandora.settings python3 -c \"from django.contrib.auth.hashers import make_password; print(make_password('${PANDORA_ADMIN_PWD}'))\"")
envsubst <adminpwd.sql | lxc-attach -u 5432 -g 5432 pandora-postgres -- psql pandora
# Install config update script