Spotter-VM/ckan-datapusher/setup.sh

18 lines
574 B
Bash
Executable File

#!/bin/sh
set -e
cd $(realpath $(dirname "${0}"))/setup
# Configure CKAN DataPusher
mkdir -p /srv/ckan-datapusher/conf /srv/ckan-datapusher/data
cp srv/ckan-datapusher/conf/datapusher.wsgi /srv/ckan-datapusher/conf/datapusher.wsgi
cp srv/ckan-datapusher/conf/datapusher_settings.py /srv/ckan-datapusher/conf/datapusher_settings.py
chown -R 8004:8004 /srv/ckan-datapusher/data
# Install service
cp etc/init.d/ckan-datapusher /etc/init.d/ckan-datapusher
rc-update -u
# Install config update script
cp srv/ckan-datapusher/update-conf.sh /srv/ckan-datapusher/update-conf.sh