Unset Kanboard pgpassword earlier

This commit is contained in:
Disassembler 2017-11-29 21:10:23 +01:00
parent b46cd81b27
commit 81f4dd3dce

View File

@ -33,6 +33,7 @@ sudo -u postgres psql -f /tmp/kanboard-createdb.sql
rm -f /tmp/kanboard-createdb.sql
export PGPASSWORD=${KANBOARD_PWD}
psql -f /srv/kanboard/app/Schema/Sql/postgres.sql kanboard kanboard
unset PGPASSWORD
# Configure Kanboard
envsubst <${SOURCE_DIR}/kanboard/srv/kanboard/config.php >/srv/kanboard/config.php
@ -40,8 +41,7 @@ export KANBOARD_ADMIN_USER=admin
export KANBOARD_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
export KANBOARD_ADMIN_HASH=$(php -r "echo password_hash('${KANBOARD_ADMIN_PWD}', PASSWORD_BCRYPT);")
envsubst <${SOURCE_DIR}/kanboard/tmp/kanboard-adminpwd.sql >/tmp/kanboard-adminpwd.sql
psql -f /tmp/kanboard-adminpwd.sql kanboard kanboard
unset PGPASSWORD
sudo -u postgres psql -f /tmp/kanboard-adminpwd.sql kanboard
# Create OS user
adduser --system --group --home /srv/kanboard --shell /bin/false kanboard