From 8d42eac02925611b4e30592b39729e5fb56e0cd5 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Tue, 24 Sep 2019 19:15:40 +0200 Subject: [PATCH] Fix CKAN install script --- lxc-apps/ckan/install.sh | 8 ++++---- lxc-services/postgres/lxcfile | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lxc-apps/ckan/install.sh b/lxc-apps/ckan/install.sh index 5e8ce8e..8c397c1 100755 --- a/lxc-apps/ckan/install.sh +++ b/lxc-apps/ckan/install.sh @@ -54,16 +54,16 @@ cp ckan_conf/who.ini /srv/ckan/ckan_conf/who.ini chown -R 108080:108080 /srv/ckan/ckan_data # Populate database -lxc-execute ckan_ckan -- paster --plugin=ckan db init -c /etc/ckan/ckan.ini -lxc-execute ckan_ckan -- paster --plugin=ckanext-spatial spatial initdb -c /etc/ckan/ckan.ini -lxc-execute ckan_ckan -- paster --plugin=ckan datastore set-permissions -c /etc/ckan/ckan.ini | lxc-attach -u 5432 -g 5432 ckan_postgres -- psql +lxc-execute ckan -- paster --plugin=ckan db init -c /etc/ckan/ckan.ini +lxc-execute ckan -- paster --plugin=ckanext-spatial spatial initdb -c /etc/ckan/ckan.ini +lxc-execute ckan -- paster --plugin=ckan datastore set-permissions -c /etc/ckan/ckan.ini | lxc-attach -u 5432 -g 5432 ckan_postgres -- psql # Create admin account export CKAN_ADMIN_USER="admin" export CKAN_ADMIN_UUID=$(cat /proc/sys/kernel/random/uuid) export CKAN_ADMIN_APIKEY=$(cat /proc/sys/kernel/random/uuid) export CKAN_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=') -export CKAN_ADMIN_HASH=$(lxc-execute ckan_ckan -- python -c "from passlib.hash import pbkdf2_sha512;print pbkdf2_sha512.encrypt('${CKAN_ADMIN_PWD}')") +export CKAN_ADMIN_HASH=$(lxc-execute ckan -- python -c "from passlib.hash import pbkdf2_sha512;print pbkdf2_sha512.encrypt('${CKAN_ADMIN_PWD}')") export CKAN_ADMIN_EMAIL="admin@example.com" envsubst