Fix Pandora password hash generation
This commit is contained in:
parent
d08848a4d0
commit
18698ef5d4
@ -45,7 +45,7 @@ lxc-execute pandora -- /srv/pandora/pandora/manage.py sync_documentsort
|
|||||||
export PANDORA_ADMIN_USER=admin
|
export PANDORA_ADMIN_USER=admin
|
||||||
export PANDORA_ADMIN_EMAIL=admin@example.com
|
export PANDORA_ADMIN_EMAIL=admin@example.com
|
||||||
export PANDORA_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=')
|
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
|
envsubst <adminpwd.sql | lxc-attach -u 5432 -g 5432 pandora-postgres -- psql pandora
|
||||||
|
|
||||||
# Install config update script
|
# Install config update script
|
||||||
|
Loading…
Reference in New Issue
Block a user