From c2a30bc4c15f39081ad73e50f9945ad566ea5cd6 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Mon, 9 Dec 2019 22:28:11 +0100 Subject: [PATCH] Reorder KanBoard install script --- apk/vmmgr | 2 +- lxc-apps/kanboard/install.sh | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/apk/vmmgr b/apk/vmmgr index ad1bfc8..e867ee7 160000 --- a/apk/vmmgr +++ b/apk/vmmgr @@ -1 +1 @@ -Subproject commit ad1bfc8860b84148794f26c437a42b932087495f +Subproject commit e867ee7e64183b9391a68aeea8d1f9b0023d27be diff --git a/lxc-apps/kanboard/install.sh b/lxc-apps/kanboard/install.sh index c4c181a..8a237f6 100755 --- a/lxc-apps/kanboard/install.sh +++ b/lxc-apps/kanboard/install.sh @@ -11,16 +11,18 @@ lxc-execute -n kanboard-postgres -- initdb -D /var/lib/postgresql cp postgres_data/postgresql.conf /srv/kanboard/postgres_data/postgresql.conf cp postgres_data/pg_hba.conf /srv/kanboard/postgres_data/pg_hba.conf +# Configure Kanboard +mkdir -p /srv/kanboard/kanboard_conf /srv/kanboard/kanboard_data +chown -R 108080:108080 /srv/kanboard/kanboard_data +envsubst /srv/kanboard/kanboard_conf/config.php + # Populate database export KANBOARD_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') service lxc-kanboard-postgres start envsubst /srv/kanboard/kanboard_conf/config.php +# Create admin account export KANBOARD_ADMIN_USER=admin export KANBOARD_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=') export KANBOARD_ADMIN_HASH=$(python3 -c "import bcrypt; print(bcrypt.hashpw('${KANBOARD_ADMIN_PWD}'.encode(), bcrypt.gensalt()).decode().replace('2b', '2y'))")