eliminate SOURCE_DIR

This commit is contained in:
Disassembler 2018-10-25 22:22:36 +02:00
parent 7df7428acf
commit 396653c9a6
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
26 changed files with 166 additions and 166 deletions

View File

@ -4,31 +4,31 @@ set -e
# For production builds change to DEBUG=0 or comment the line entirely # For production builds change to DEBUG=0 or comment the line entirely
export DEBUG=1 export DEBUG=1
SOURCE_DIR=$(realpath $(dirname "${0}")) cd $(realpath $(dirname "${0}"))
# Install shared packages and perform OS customization # Install shared packages and perform OS customization
${SOURCE_DIR}/basic.sh ./basic.sh
${SOURCE_DIR}/basic-runtimes.sh ./basic-runtimes.sh
# Install applications # Install applications
${SOURCE_DIR}/ckan.sh ./ckan.sh
# ${SOURCE_DIR}/crisiscleanup.sh # ./crisiscleanup.sh
# ${SOURCE_DIR}/cts.sh # ./cts.sh
${SOURCE_DIR}/frontlinesms.sh ./frontlinesms.sh
${SOURCE_DIR}/gnuhealth.sh ./gnuhealth.sh
${SOURCE_DIR}/kanboard.sh ./kanboard.sh
${SOURCE_DIR}/mifosx.sh ./mifosx.sh
${SOURCE_DIR}/motech.sh ./motech.sh
${SOURCE_DIR}/opendatakit-build.sh ./opendatakit-build.sh
${SOURCE_DIR}/opendatakit.sh ./opendatakit.sh
${SOURCE_DIR}/openmapkit.sh ./openmapkit.sh
${SOURCE_DIR}/pandora.sh ./pandora.sh
${SOURCE_DIR}/sahana.sh ./sahana.sh
${SOURCE_DIR}/sahana-demo.sh ./sahana-demo.sh
${SOURCE_DIR}/sambro.sh ./sambro.sh
${SOURCE_DIR}/seeddms.sh ./seeddms.sh
${SOURCE_DIR}/sigmah.sh ./sigmah.sh
${SOURCE_DIR}/ushahidi.sh ./ushahidi.sh
# Perform cleanup only if DEBUG mode is not set # Perform cleanup only if DEBUG mode is not set
[ ${DEBUG:-0} -eq 1 ] && exit 0 [ ${DEBUG:-0} -eq 1 ] && exit 0

View File

@ -1,12 +1,12 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
# Configure ActiveMQ # Configure ActiveMQ
mkdir -p /srv/activemq/data mkdir -p /srv/activemq/data
chown -R 61616:61616 /srv/activemq/data chown -R 61616:61616 /srv/activemq/data
# Create service # Create service
cp ${SOURCE_DIR}/etc/init.d/activemq /etc/init.d/activemq cp etc/init.d/activemq /etc/init.d/activemq
rc-update -u rc-update -u

View File

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

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
# Check prerequisites # Check prerequisites
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1 [ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
@ -11,12 +11,12 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/setup
# Create database # Create database
export CKAN_PWD=$(head -c 18 /dev/urandom | base64) export CKAN_PWD=$(head -c 18 /dev/urandom | base64)
export CKAN_DS_PWD=$(head -c 18 /dev/urandom | base64) export CKAN_DS_PWD=$(head -c 18 /dev/urandom | base64)
envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql
# Configure CKAN Solr core # Configure CKAN Solr core
lxc-attach -u 8983 -g 8983 solr -- solr create -p 8983 -c ckan lxc-attach -u 8983 -g 8983 solr -- solr create -p 8983 -c ckan
cp ${SOURCE_DIR}/srv/solr/data/ckan/conf/schema.xml /srv/solr/data/ckan/conf/schema.xml cp srv/solr/data/ckan/conf/schema.xml /srv/solr/data/ckan/conf/schema.xml
cp ${SOURCE_DIR}/srv/solr/data/ckan/conf/solrconfig.xml /srv/solr/data/ckan/conf/solrconfig.xml cp srv/solr/data/ckan/conf/solrconfig.xml /srv/solr/data/ckan/conf/solrconfig.xml
chown 8983:8983 /srv/solr/data/ckan/conf/schema.xml chown 8983:8983 /srv/solr/data/ckan/conf/schema.xml
service solr restart service solr restart
@ -24,8 +24,8 @@ service solr restart
mkdir -p /srv/ckan/conf /srv/ckan/data mkdir -p /srv/ckan/conf /srv/ckan/data
export CKAN_SECRET=$(head -c 18 /dev/urandom | base64) export CKAN_SECRET=$(head -c 18 /dev/urandom | base64)
export CKAN_UUID=$(cat /proc/sys/kernel/random/uuid) export CKAN_UUID=$(cat /proc/sys/kernel/random/uuid)
envsubst <${SOURCE_DIR}/srv/ckan/conf/ckan.ini >/srv/ckan/conf/ckan.ini envsubst <srv/ckan/conf/ckan.ini >/srv/ckan/conf/ckan.ini
cp ${SOURCE_DIR}/srv/ckan/conf/who.ini /srv/ckan/conf/who.ini cp srv/ckan/conf/who.ini /srv/ckan/conf/who.ini
chown -R 8003:8003 /srv/ckan/data chown -R 8003:8003 /srv/ckan/data
# Set "production values" (increases performance) only if the DEBUG environment variable is not set # Set "production values" (increases performance) only if the DEBUG environment variable is not set
@ -45,18 +45,18 @@ export CKAN_ADMIN_APIKEY=$(cat /proc/sys/kernel/random/uuid)
export CKAN_ADMIN_PWD=$(head -c 12 /dev/urandom | base64) export CKAN_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
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_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" export CKAN_ADMIN_EMAIL="admin@example.com"
envsubst <${SOURCE_DIR}/adminpwd.sql | lxc-attach -u 5432 -g 5432 postgres -- psql ckan envsubst <adminpwd.sql | lxc-attach -u 5432 -g 5432 postgres -- psql ckan
vmmgr update-login ckan "${CKAN_ADMIN_USER}" "${CKAN_ADMIN_PWD}" vmmgr update-login ckan "${CKAN_ADMIN_USER}" "${CKAN_ADMIN_PWD}"
# Install cron job # Install cron job
cp ${SOURCE_DIR}/etc/periodic/hourly/ckan /etc/periodic/hourly/ckan cp etc/periodic/hourly/ckan /etc/periodic/hourly/ckan
# Install service # Install service
cp ${SOURCE_DIR}/etc/init.d/ckan /etc/init.d/ckan cp etc/init.d/ckan /etc/init.d/ckan
rc-update -u rc-update -u
# Install config update script # Install config update script
cp ${SOURCE_DIR}/srv/ckan/update-conf.sh /srv/ckan/update-conf.sh cp srv/ckan/update-conf.sh /srv/ckan/update-conf.sh
# Stop services required for setup # Stop services required for setup
[ ! -z ${STOP_POSTGRES} ] && service postgres stop [ ! -z ${STOP_POSTGRES} ] && service postgres stop

View File

@ -1,14 +1,14 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
# Check prerequisites # Check prerequisites
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1 [ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
# Create database # Create database
export CRISISCLEANUP_PWD=$(head -c 18 /dev/urandom | base64) export CRISISCLEANUP_PWD=$(head -c 18 /dev/urandom | base64)
envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql
# Copy existing config files into persistent storage # Copy existing config files into persistent storage
mkdir -p /srv/crisiscleanup/conf mkdir -p /srv/crisiscleanup/conf
@ -19,23 +19,23 @@ cp -r /var/lib/lxc/crisiscleanup/crisiscleanup/srv/crisiscleanup/config/. /srv/c
export CRISISCLEANUP_ADMIN_USER="Admin" export CRISISCLEANUP_ADMIN_USER="Admin"
export CRISISCLEANUP_ADMIN_EMAIL="admin@example.com" export CRISISCLEANUP_ADMIN_EMAIL="admin@example.com"
export CRISISCLEANUP_ADMIN_PWD=$(head -c 12 /dev/urandom | base64) export CRISISCLEANUP_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
envsubst <${SOURCE_DIR}/srv/crisiscleanup/conf/database.yml >/srv/crisiscleanup/conf/database.yml envsubst <srv/crisiscleanup/conf/database.yml >/srv/crisiscleanup/conf/database.yml
cp ${SOURCE_DIR}/srv/crisiscleanup/conf/boot.rb /srv/crisiscleanup/conf/boot.rb cp srv/crisiscleanup/conf/boot.rb /srv/crisiscleanup/conf/boot.rb
cp ${SOURCE_DIR}/srv/crisiscleanup/conf/initializers/devise.rb /srv/crisiscleanup/conf/initializers/devise.rb cp srv/crisiscleanup/conf/initializers/devise.rb /srv/crisiscleanup/conf/initializers/devise.rb
cp ${SOURCE_DIR}/srv/crisiscleanup/conf/environments/production.rb /srv/crisiscleanup/conf/environments/production.rb cp srv/crisiscleanup/conf/environments/production.rb /srv/crisiscleanup/conf/environments/production.rb
vmmgr update-login crisiscleanup "${CRISISCLEANUP_ADMIN_EMAIL}" "${CRISISCLEANUP_ADMIN_PWD}" vmmgr update-login crisiscleanup "${CRISISCLEANUP_ADMIN_EMAIL}" "${CRISISCLEANUP_ADMIN_PWD}"
# Populate database # Populate database
envsubst <${SOURCE_DIR}/srv/crisiscleanup/db/seeds.rb >/var/lib/lxc/crisiscleanup/crisiscleanup/srv/crisiscleanup/db/seeds.rb envsubst <srv/crisiscleanup/db/seeds.rb >/var/lib/lxc/crisiscleanup/crisiscleanup/srv/crisiscleanup/db/seeds.rb
lxc-execute crisiscleanup -- rake db:schema:load lxc-execute crisiscleanup -- rake db:schema:load
lxc-execute crisiscleanup -- rake db:seed lxc-execute crisiscleanup -- rake db:seed
# Install service # Install service
cp ${SOURCE_DIR}/etc/init.d/crisiscleanup /etc/init.d/crisiscleanup cp etc/init.d/crisiscleanup /etc/init.d/crisiscleanup
rc-update -u rc-update -u
# Install config update script # Install config update script
cp ${SOURCE_DIR}/srv/crisiscleanup/update-conf.sh /srv/crisiscleanup/update-conf.sh cp srv/crisiscleanup/update-conf.sh /srv/crisiscleanup/update-conf.sh
# Stop services required for setup # Stop services required for setup
[ ! -z ${STOP_POSTGRES} ] && service postgres stop [ ! -z ${STOP_POSTGRES} ] && service postgres stop

View File

@ -1,14 +1,14 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
# Check prerequisites # Check prerequisites
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1 [ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
# Create database # Create database
export CTS_PWD=$(head -c 18 /dev/urandom | base64) export CTS_PWD=$(head -c 18 /dev/urandom | base64)
envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql
# Copy existing config files into persistent storage # Copy existing config files into persistent storage
mkdir -p /srv/cts/conf mkdir -p /srv/cts/conf
@ -16,7 +16,7 @@ cp /var/lib/lxc/cts/cts/srv/cts/cts/settings/base.py /srv/cts/conf
# Configure CTS # Configure CTS
export CTS_SECRET=$(head -c 26 /dev/urandom | base64) export CTS_SECRET=$(head -c 26 /dev/urandom | base64)
envsubst <${SOURCE_DIR}/srv/cts/conf/spotter.py >/srv/cts/conf/spotter.py envsubst <srv/cts/conf/spotter.py >/srv/cts/conf/spotter.py
touch /srv/cts/conf/__init__.py touch /srv/cts/conf/__init__.py
# Set "production values" (increases performance) only if the DEBUG environment variable is not set # Set "production values" (increases performance) only if the DEBUG environment variable is not set
@ -32,15 +32,15 @@ export CTS_ADMIN_EMAIL=admin@example.com
export CTS_ADMIN_PWD=$(head -c 12 /dev/urandom | base64) export CTS_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
export CTS_ADMIN_HASH=$(lxc-execute cts -- python -c "from django.contrib.auth.hashers import make_password; print make_password('${CTS_ADMIN_PWD}')") export CTS_ADMIN_HASH=$(lxc-execute cts -- python -c "from django.contrib.auth.hashers import make_password; print make_password('${CTS_ADMIN_PWD}')")
export CTS_ADMIN_SECRET=$(head -c 12 /dev/urandom | sha256sum | cut -c1-13) export CTS_ADMIN_SECRET=$(head -c 12 /dev/urandom | sha256sum | cut -c1-13)
envsubst <${SOURCE_DIR}/adminpwd.sql | lxc-attach -u 5432 -g 5432 postgres -- psql cts envsubst <adminpwd.sql | lxc-attach -u 5432 -g 5432 postgres -- psql cts
vmmgr update-login cts "${CTS_ADMIN_EMAIL}" "${CTS_ADMIN_PWD}" vmmgr update-login cts "${CTS_ADMIN_EMAIL}" "${CTS_ADMIN_PWD}"
# Install service # Install service
cp ${SOURCE_DIR}/etc/init.d/cts /etc/init.d/cts cp etc/init.d/cts /etc/init.d/cts
rc-update -u rc-update -u
# Install config update script # Install config update script
cp ${SOURCE_DIR}/srv/cts/update-conf.sh /srv/cts/update-conf.sh cp srv/cts/update-conf.sh /srv/cts/update-conf.sh
# Stop services required for setup # Stop services required for setup
[ ! -z ${STOP_POSTGRES} ] && service postgres stop [ ! -z ${STOP_POSTGRES} ] && service postgres stop

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
# Configure FrontlineSMS # Configure FrontlineSMS
mkdir -p /srv/frontlinesms/data mkdir -p /srv/frontlinesms/data
@ -9,10 +9,10 @@ export FRONTLINESMS_ADMIN_USER="admin"
export FRONTLINESMS_ADMIN_PWD=$(head -c 12 /dev/urandom | base64) export FRONTLINESMS_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
export FRONTLINESMS_ADMIN_USER_HASH=$(echo -n "${FRONTLINESMS_ADMIN_USER}" | base64) export FRONTLINESMS_ADMIN_USER_HASH=$(echo -n "${FRONTLINESMS_ADMIN_USER}" | base64)
export FRONTLINESMS_ADMIN_PWD_HASH=$(echo -n "${FRONTLINESMS_ADMIN_PWD}" | base64) export FRONTLINESMS_ADMIN_PWD_HASH=$(echo -n "${FRONTLINESMS_ADMIN_PWD}" | base64)
envsubst <${SOURCE_DIR}/srv/frontlinesms/data/app-settings.properties >/srv/frontlinesms/data/app-settings.properties envsubst <srv/frontlinesms/data/app-settings.properties >/srv/frontlinesms/data/app-settings.properties
chown -R 8018:8018 /srv/frontlinesms/data chown -R 8018:8018 /srv/frontlinesms/data
vmmgr update-login frontlinesms "${FRONTLINESMS_ADMIN_USER}" "${FRONTLINESMS_ADMIN_PWD}" vmmgr update-login frontlinesms "${FRONTLINESMS_ADMIN_USER}" "${FRONTLINESMS_ADMIN_PWD}"
# Install service # Install service
cp ${SOURCE_DIR}/etc/init.d/frontlinesms /etc/init.d/frontlinesms cp etc/init.d/frontlinesms /etc/init.d/frontlinesms
rc-update -u rc-update -u

View File

@ -1,18 +1,18 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
# Check prerequisites # Check prerequisites
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1 [ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
# Create databases # Create databases
export GNUHEALTH_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '/+=') export GNUHEALTH_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '/+=')
envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql
# Configure GNU Health # Configure GNU Health
mkdir -p /srv/gnuhealth/conf/ mkdir -p /srv/gnuhealth/conf/
envsubst <${SOURCE_DIR}/srv/gnuhealth/conf/trytond.conf >/srv/gnuhealth/conf/trytond.conf envsubst <srv/gnuhealth/conf/trytond.conf >/srv/gnuhealth/conf/trytond.conf
# Populate database # Populate database
export GNUHEALTH_ADMIN_USER="admin" export GNUHEALTH_ADMIN_USER="admin"
@ -28,11 +28,11 @@ zcat /tmp/gnuhealth_demo.sql.gz | lxc-attach -u 5432 -g 5432 postgres -- sh -c "
rm -f /tmp/gnuhealth_demo.sql.gz rm -f /tmp/gnuhealth_demo.sql.gz
# Install service # Install service
cp ${SOURCE_DIR}/etc/init.d/gnuhealth /etc/init.d/gnuhealth cp etc/init.d/gnuhealth /etc/init.d/gnuhealth
rc-update -u rc-update -u
# Install config update script # Install config update script
cp ${SOURCE_DIR}/srv/gnuhealth/update-conf.sh /srv/gnuhealth/update-conf.sh cp srv/gnuhealth/update-conf.sh /srv/gnuhealth/update-conf.sh
# Stop services required for setup # Stop services required for setup
[ ! -z ${STOP_POSTGRES} ] && service postgres stop [ ! -z ${STOP_POSTGRES} ] && service postgres stop

View File

@ -1,35 +1,35 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
# Check prerequisites # Check prerequisites
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1 [ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
# Populate database # Populate database
export KANBOARD_PWD=$(head -c 18 /dev/urandom | base64) export KANBOARD_PWD=$(head -c 18 /dev/urandom | base64)
envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql
cat /var/lib/lxc/kanboard/kanboard/srv/kanboard/app/Schema/Sql/postgres.sql | lxc-attach -u 5432 -g 5432 postgres -- sh -c "PGPASSWORD=${KANBOARD_PWD} psql kanboard kanboard" cat /var/lib/lxc/kanboard/kanboard/srv/kanboard/app/Schema/Sql/postgres.sql | lxc-attach -u 5432 -g 5432 postgres -- sh -c "PGPASSWORD=${KANBOARD_PWD} psql kanboard kanboard"
# Configure Kanboard # Configure Kanboard
mkdir -p /srv/kanboard/conf /srv/kanboard/data mkdir -p /srv/kanboard/conf /srv/kanboard/data
chown -R 8009:8009 /srv/kanboard/data chown -R 8009:8009 /srv/kanboard/data
envsubst <${SOURCE_DIR}/srv/kanboard/conf/config.php >/srv/kanboard/conf/config.php envsubst <srv/kanboard/conf/config.php >/srv/kanboard/conf/config.php
export KANBOARD_ADMIN_USER=admin export KANBOARD_ADMIN_USER=admin
export KANBOARD_ADMIN_PWD=$(head -c 12 /dev/urandom | base64) export KANBOARD_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
export KANBOARD_ADMIN_HASH=$(python3 -c "import bcrypt; print(bcrypt.hashpw('${KANBOARD_ADMIN_PWD}'.encode(), bcrypt.gensalt()).decode().replace('2b', '2y'))") export KANBOARD_ADMIN_HASH=$(python3 -c "import bcrypt; print(bcrypt.hashpw('${KANBOARD_ADMIN_PWD}'.encode(), bcrypt.gensalt()).decode().replace('2b', '2y'))")
envsubst <${SOURCE_DIR}/adminpwd.sql | lxc-attach -u 5432 -g 5432 postgres -- psql kanboard envsubst <adminpwd.sql | lxc-attach -u 5432 -g 5432 postgres -- psql kanboard
vmmgr update-login kanboard "${KANBOARD_ADMIN_USER}" "${KANBOARD_ADMIN_PWD}" vmmgr update-login kanboard "${KANBOARD_ADMIN_USER}" "${KANBOARD_ADMIN_PWD}"
# Install cron job # Install cron job
cp ${SOURCE_DIR}/etc/periodic/daily/kanboard /etc/periodic/daily/kanboard cp etc/periodic/daily/kanboard /etc/periodic/daily/kanboard
# Install service # Install service
cp ${SOURCE_DIR}/etc/init.d/kanboard /etc/init.d/kanboard cp etc/init.d/kanboard /etc/init.d/kanboard
rc-update -u rc-update -u
# Install config update script # Install config update script
cp ${SOURCE_DIR}/srv/kanboard/update-conf.sh /srv/kanboard/update-conf.sh cp srv/kanboard/update-conf.sh /srv/kanboard/update-conf.sh
# Stop services required for build # Stop services required for build
[ ! -z ${STOP_POSTGRES} ] && service postgres stop [ ! -z ${STOP_POSTGRES} ] && service postgres stop

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
# Create MariaDB instance # Create MariaDB instance
mkdir -p /srv/mariadb/conf /srv/mariadb/data mkdir -p /srv/mariadb/conf /srv/mariadb/data
@ -9,7 +9,7 @@ chown 3306:3306 /srv/mariadb/data
lxc-execute mariadb -- mysql_install_db --user=mysql lxc-execute mariadb -- mysql_install_db --user=mysql
# Configure MariaDB # Configure MariaDB
cp ${SOURCE_DIR}/srv/mariadb/conf/my.cnf /srv/mariadb/conf/my.cnf cp srv/mariadb/conf/my.cnf /srv/mariadb/conf/my.cnf
# Enable query logging. Only if the DEBUG environment variable is set # Enable query logging. Only if the DEBUG environment variable is set
if [ ${DEBUG:-0} -eq 1 ]; then if [ ${DEBUG:-0} -eq 1 ]; then
@ -17,10 +17,10 @@ if [ ${DEBUG:-0} -eq 1 ]; then
fi fi
# Install service # Install service
cp ${SOURCE_DIR}/etc/init.d/mariadb /etc/init.d/mariadb cp etc/init.d/mariadb /etc/init.d/mariadb
rc-update -u rc-update -u
# Configure MariaDB admin # Configure MariaDB admin
service mariadb start service mariadb start
cat ${SOURCE_DIR}/adminpwd.sql | lxc-attach mariadb -- mysql cat adminpwd.sql | lxc-attach mariadb -- mysql
service mariadb stop service mariadb stop

View File

@ -1,26 +1,26 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
# Check prerequisites # Check prerequisites
[ ! -e /run/openrc/started/mariadb ] && service mariadb start && STOP_MARIADB=1 [ ! -e /run/openrc/started/mariadb ] && service mariadb start && STOP_MARIADB=1
# Create databases # Create databases
export MIFOSX_PWD=$(head -c 18 /dev/urandom | base64) export MIFOSX_PWD=$(head -c 18 /dev/urandom | base64)
envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach mariadb -- mysql envsubst <createdb.sql | lxc-attach mariadb -- mysql
# Populate database # Populate database
cat /var/lib/lxc/mifosx/mifosx/tmp/mifospltaform-tenants-first-time-install.sql | lxc-attach mariadb -- mysql mifosplatform-tenants cat /var/lib/lxc/mifosx/mifosx/tmp/mifospltaform-tenants-first-time-install.sql | lxc-attach mariadb -- mysql mifosplatform-tenants
envsubst <${SOURCE_DIR}/schemapwd.sql | lxc-attach mariadb -- mysql mifosplatform-tenants envsubst <schemapwd.sql | lxc-attach mariadb -- mysql mifosplatform-tenants
# Configure Mifos X # Configure Mifos X
mkdir -p /srv/mifosx/conf mkdir -p /srv/mifosx/conf
envsubst <${SOURCE_DIR}/srv/mifosx/conf/context.xml >/srv/mifosx/conf/context.xml envsubst <srv/mifosx/conf/context.xml >/srv/mifosx/conf/context.xml
cp ${SOURCE_DIR}/srv/mifosx/conf/server.xml /srv/mifosx/conf/server.xml cp srv/mifosx/conf/server.xml /srv/mifosx/conf/server.xml
# Install service # Install service
cp ${SOURCE_DIR}/etc/init.d/mifosx /etc/init.d/mifosx cp etc/init.d/mifosx /etc/init.d/mifosx
rc-update -u rc-update -u
# Populate database # Populate database
@ -38,11 +38,11 @@ export MIFOSX_ADMIN_USER=admin
export MIFOSX_ADMIN_EMAIL=admin@example.com export MIFOSX_ADMIN_EMAIL=admin@example.com
export MIFOSX_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d "+") export MIFOSX_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d "+")
export MIFOSX_ADMIN_HASH=$(echo -n "${MIFOSX_ADMIN_PWD}{1}" | sha256sum | awk '{print $1}') export MIFOSX_ADMIN_HASH=$(echo -n "${MIFOSX_ADMIN_PWD}{1}" | sha256sum | awk '{print $1}')
envsubst <${SOURCE_DIR}/adminpwd.sql | lxc-attach mariadb -- mysql mifostenant-default envsubst <adminpwd.sql | lxc-attach mariadb -- mysql mifostenant-default
vmmgr update-login mifosx "${MIFOSX_ADMIN_USER}" "${MIFOSX_ADMIN_PWD}" vmmgr update-login mifosx "${MIFOSX_ADMIN_USER}" "${MIFOSX_ADMIN_PWD}"
# Install config update script # Install config update script
cp ${SOURCE_DIR}/srv/mifosx/update-conf.sh /srv/mifosx/update-conf.sh cp srv/mifosx/update-conf.sh /srv/mifosx/update-conf.sh
# Stop services required for setup # Stop services required for setup
[ ! -z ${STOP_MARIADB} ] && service mariadb stop [ ! -z ${STOP_MARIADB} ] && service mariadb stop

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
# Check prerequisites # Check prerequisites
[ ! -e /run/openrc/started/activemq ] && service activemq start && STOP_ACTIVEMQ=1 [ ! -e /run/openrc/started/activemq ] && service activemq start && STOP_ACTIVEMQ=1
@ -9,18 +9,18 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/setup
# Create database # Create database
export MOTECH_PWD=$(head -c 18 /dev/urandom | base64) export MOTECH_PWD=$(head -c 18 /dev/urandom | base64)
envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql
# Configure Motech # Configure Motech
mkdir -p /srv/motech/conf/config/org.motechproject.motech-platform-email mkdir -p /srv/motech/conf/config/org.motechproject.motech-platform-email
envsubst <${SOURCE_DIR}/srv/motech/conf/config/bootstrap.properties >/srv/motech/conf/config/bootstrap.properties envsubst <srv/motech/conf/config/bootstrap.properties >/srv/motech/conf/config/bootstrap.properties
cp ${SOURCE_DIR}/srv/motech/conf/config-locations.properties /srv/motech/conf/config-locations.properties cp srv/motech/conf/config-locations.properties /srv/motech/conf/config-locations.properties
cp ${SOURCE_DIR}/srv/motech/conf/config/motech-settings.properties /srv/motech/conf/config/motech-settings.properties cp srv/motech/conf/config/motech-settings.properties /srv/motech/conf/config/motech-settings.properties
cp ${SOURCE_DIR}/srv/motech/conf/config/org.motechproject.motech-platform-email/motech-email.properties /srv/motech/conf/config/org.motechproject.motech-platform-email/motech-email.properties cp srv/motech/conf/config/org.motechproject.motech-platform-email/motech-email.properties /srv/motech/conf/config/org.motechproject.motech-platform-email/motech-email.properties
chown -R 8013:8013 /srv/motech/conf chown -R 8013:8013 /srv/motech/conf
# Install service # Install service
cp ${SOURCE_DIR}/etc/init.d/motech /etc/init.d/motech cp etc/init.d/motech /etc/init.d/motech
rc-update -u rc-update -u
# Populate database and create admin account # Populate database and create admin account
@ -38,7 +38,7 @@ service motech stop
vmmgr update-login motech "${MOTECH_ADMIN_USER}" "${MOTECH_ADMIN_PWD}" vmmgr update-login motech "${MOTECH_ADMIN_USER}" "${MOTECH_ADMIN_PWD}"
# Install config update script # Install config update script
cp ${SOURCE_DIR}/srv/motech/update-conf.sh /srv/motech/update-conf.sh cp srv/motech/update-conf.sh /srv/motech/update-conf.sh
# Stop services required for build # Stop services required for build
[ ! -z ${STOP_ACTIVEMQ} ] && service activemq stop [ ! -z ${STOP_ACTIVEMQ} ] && service activemq stop

View File

@ -1,23 +1,23 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
# Check prerequisites # Check prerequisites
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1 [ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
# Create databases # Create databases
export OPENDATAKITBUILD_PWD=$(head -c 18 /dev/urandom | base64) export OPENDATAKITBUILD_PWD=$(head -c 18 /dev/urandom | base64)
envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach -u 5432 -g 5432 postgres psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 postgres psql
# Configure OpenDataKit Build # Configure OpenDataKit Build
export OPENDATAKITBUILD_COOKIE_SECRET=$(head -c 8 /dev/urandom | hexdump -e '"%x"') export OPENDATAKITBUILD_COOKIE_SECRET=$(head -c 8 /dev/urandom | hexdump -e '"%x"')
mkdir -p /srv/opendatakit-build/conf mkdir -p /srv/opendatakit-build/conf
envsubst <${SOURCE_DIR}/srv/opendatakit-build/conf/config.yml >/srv/opendatakit-build/conf/config.yml envsubst <srv/opendatakit-build/conf/config.yml >/srv/opendatakit-build/conf/config.yml
lxc-execute opendatakit-build -- sh -c 'cd /srv/opendatakit-build; rake db:migrate' lxc-execute opendatakit-build -- sh -c 'cd /srv/opendatakit-build; rake db:migrate'
# Install service # Install service
cp ${SOURCE_DIR}/etc/init.d/opendatakit-build /etc/init.d/opendatakit-build cp etc/init.d/opendatakit-build /etc/init.d/opendatakit-build
rc-update -u rc-update -u
# Stop services required for build # Stop services required for build

View File

@ -1,26 +1,26 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
# Check prerequisites # Check prerequisites
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1 [ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
# Create databases # Create databases
export OPENDATAKIT_PWD=$(head -c 18 /dev/urandom | base64) export OPENDATAKIT_PWD=$(head -c 18 /dev/urandom | base64)
envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql
# Configure OpenDataKit # Configure OpenDataKit
mkdir -p /srv/opendatakit/conf mkdir -p /srv/opendatakit/conf
export OPENDATAKIT_ADMIN_USER=admin export OPENDATAKIT_ADMIN_USER=admin
export OPENDATAKIT_ADMIN_REALM=spotter export OPENDATAKIT_ADMIN_REALM=spotter
envsubst <${SOURCE_DIR}/srv/opendatakit/conf/jdbc.properties >/srv/opendatakit/conf/jdbc.properties envsubst <srv/opendatakit/conf/jdbc.properties >/srv/opendatakit/conf/jdbc.properties
envsubst <${SOURCE_DIR}/srv/opendatakit/conf/security.properties >/srv/opendatakit/conf/security.properties envsubst <srv/opendatakit/conf/security.properties >/srv/opendatakit/conf/security.properties
cp ${SOURCE_DIR}/srv/opendatakit/conf/server.xml /srv/opendatakit/conf/server.xml cp srv/opendatakit/conf/server.xml /srv/opendatakit/conf/server.xml
chown -R 8015:8015 /srv/opendatakit/conf chown -R 8015:8015 /srv/opendatakit/conf
# Install service # Install service
cp ${SOURCE_DIR}/etc/init.d/opendatakit /etc/init.d/opendatakit cp etc/init.d/opendatakit /etc/init.d/opendatakit
rc-update -u rc-update -u
# Populate database # Populate database
@ -35,11 +35,11 @@ export OPENDATAKIT_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
export OPENDATAKIT_ADMIN_SALT=$(head -c 4 /dev/urandom | hexdump -e '"%x"') # Must be 8 characters export OPENDATAKIT_ADMIN_SALT=$(head -c 4 /dev/urandom | hexdump -e '"%x"') # Must be 8 characters
export OPENDATAKIT_ADMIN_BASIC_HASH=$(echo -n "${OPENDATAKIT_ADMIN_PWD}{${OPENDATAKIT_ADMIN_SALT}}" | sha1sum | tr -d " -") export OPENDATAKIT_ADMIN_BASIC_HASH=$(echo -n "${OPENDATAKIT_ADMIN_PWD}{${OPENDATAKIT_ADMIN_SALT}}" | sha1sum | tr -d " -")
export OPENDATAKIT_ADMIN_DIGEST_HASH=$(echo -n "${OPENDATAKIT_ADMIN_USER}:${OPENDATAKIT_ADMIN_REALM}:${OPENDATAKIT_ADMIN_PWD}" | md5sum | tr -d " -") export OPENDATAKIT_ADMIN_DIGEST_HASH=$(echo -n "${OPENDATAKIT_ADMIN_USER}:${OPENDATAKIT_ADMIN_REALM}:${OPENDATAKIT_ADMIN_PWD}" | md5sum | tr -d " -")
envsubst <${SOURCE_DIR}/adminpwd.sql | lxc-attach -u 5432 -g 5432 postgres -- psql opendatakit envsubst <adminpwd.sql | lxc-attach -u 5432 -g 5432 postgres -- psql opendatakit
vmmgr update-login opendatakit "${OPENDATAKIT_ADMIN_USER}" "${OPENDATAKIT_ADMIN_PWD}" vmmgr update-login opendatakit "${OPENDATAKIT_ADMIN_USER}" "${OPENDATAKIT_ADMIN_PWD}"
# Install config update script # Install config update script
cp ${SOURCE_DIR}/srv/opendatakit/update-conf.sh /srv/opendatakit/update-conf.sh cp srv/opendatakit/update-conf.sh /srv/opendatakit/update-conf.sh
# Stop services required for build # Stop services required for build
[ ! -z ${STOP_POSTGRES} ] && service postgres stop [ ! -z ${STOP_POSTGRES} ] && service postgres stop

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
# Configure OpenMapKit # Configure OpenMapKit
export OPENMAPKIT_ADMIN_USER="admin" export OPENMAPKIT_ADMIN_USER="admin"
@ -9,9 +9,9 @@ export OPENMAPKIT_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
mkdir -p /srv/openmapkit/conf /srv/openmapkit/data mkdir -p /srv/openmapkit/conf /srv/openmapkit/data
chown -R 8007:8007 /srv/openmapkit/data chown -R 8007:8007 /srv/openmapkit/data
cp -rp /var/lib/lxc/openmapkit/openmapkit/srv/openmapkit/data/. /srv/openmapkit/data cp -rp /var/lib/lxc/openmapkit/openmapkit/srv/openmapkit/data/. /srv/openmapkit/data
envsubst <${SOURCE_DIR}/srv/openmapkit/conf/settings.js >/srv/openmapkit/conf/settings.js envsubst <srv/openmapkit/conf/settings.js >/srv/openmapkit/conf/settings.js
vmmgr update-login openmapkit "${OPENMAPKIT_ADMIN_USER}" "${OPENMAPKIT_ADMIN_PWD}" vmmgr update-login openmapkit "${OPENMAPKIT_ADMIN_USER}" "${OPENMAPKIT_ADMIN_PWD}"
# Install service # Install service
cp ${SOURCE_DIR}/etc/init.d/openmapkit /etc/init.d/openmapkit cp etc/init.d/openmapkit /etc/init.d/openmapkit
rc-update -u rc-update -u

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
# Check prerequisites # Check prerequisites
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1 [ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
@ -9,7 +9,7 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/setup
# Create PostgreSQL user and database # Create PostgreSQL user and database
export PANDORA_PWD=$(head -c 18 /dev/urandom | base64) export PANDORA_PWD=$(head -c 18 /dev/urandom | base64)
envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql
# Configure RabbitMQ # Configure RabbitMQ
export PANDORA_RABBIT_PWD=$(head -c 18 /dev/urandom | base64 | tr -d "/") export PANDORA_RABBIT_PWD=$(head -c 18 /dev/urandom | base64 | tr -d "/")
@ -22,13 +22,13 @@ mkdir -p /srv/pandora/conf /srv/pandora/data
chown 8002:8002 /srv/pandora/data chown 8002:8002 /srv/pandora/data
# Copy customized configuration if VANILLA environment variable is not set, else use the default pandora config # Copy customized configuration if VANILLA environment variable is not set, else use the default pandora config
if [ ${VANILLA:-0} -eq 0 ]; then if [ ${VANILLA:-0} -eq 0 ]; then
cp ${SOURCE_DIR}/srv/pandora/conf/config.jsonc /srv/pandora/conf cp srv/pandora/conf/config.jsonc /srv/pandora/conf
else else
chown 8002:8002 /srv/pandora/conf chown 8002:8002 /srv/pandora/conf
cp /var/lib/lxc/pandora/pandora/srv/pandora/pandora/config.pandora.jsonc /srv/pandora/conf cp /var/lib/lxc/pandora/pandora/srv/pandora/pandora/config.pandora.jsonc /srv/pandora/conf
fi fi
cp ${SOURCE_DIR}/srv/pandora/conf/gunicorn_config.py /srv/pandora/conf/gunicorn_config.py cp srv/pandora/conf/gunicorn_config.py /srv/pandora/conf/gunicorn_config.py
envsubst <${SOURCE_DIR}/srv/pandora/conf/local_settings.py >/srv/pandora/conf/local_settings.py envsubst <srv/pandora/conf/local_settings.py >/srv/pandora/conf/local_settings.py
# Set "production values" (increases performance) only if the DEBUG environment variable is not set # Set "production values" (increases performance) only if the DEBUG environment variable is not set
if [ ${DEBUG:-0} -eq 0 ]; then if [ ${DEBUG:-0} -eq 0 ]; then
@ -46,15 +46,15 @@ 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) export PANDORA_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
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 "DJANGO_SETTINGS_MODULE=srv.pandora.pandora.settings python3 -c \"from django.contrib.auth.hashers import make_password; print(make_password('${PANDORA_ADMIN_PWD}'))\"")
envsubst <${SOURCE_DIR}/adminpwd.sql | lxc-attach -u 5432 -g 5432 postgres -- psql pandora envsubst <adminpwd.sql | lxc-attach -u 5432 -g 5432 postgres -- psql pandora
vmmgr update-login pandora "${PANDORA_ADMIN_USER}" "${PANDORA_ADMIN_PWD}" vmmgr update-login pandora "${PANDORA_ADMIN_USER}" "${PANDORA_ADMIN_PWD}"
# Install service # Install service
cp ${SOURCE_DIR}/etc/init.d/pandora /etc/init.d/pandora cp etc/init.d/pandora /etc/init.d/pandora
rc-update -u rc-update -u
# Install config update script # Install config update script
cp ${SOURCE_DIR}/srv/pandora/update-conf.sh /srv/pandora/update-conf.sh cp srv/pandora/update-conf.sh /srv/pandora/update-conf.sh
# Stop services required for build # Stop services required for build
[ ! -z ${STOP_POSTGRES} ] && service postgres stop [ ! -z ${STOP_POSTGRES} ] && service postgres stop

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
# Create Postgres instance # Create Postgres instance
mkdir -p /srv/postgres/data mkdir -p /srv/postgres/data
@ -10,8 +10,8 @@ chmod 700 /srv/postgres/data
lxc-execute -n postgres -- initdb -D /var/lib/postgresql lxc-execute -n postgres -- initdb -D /var/lib/postgresql
# Configure Postgres # Configure Postgres
cp ${SOURCE_DIR}/srv/postgres/data/postgresql.conf /srv/postgres/data/postgresql.conf cp srv/postgres/data/postgresql.conf /srv/postgres/data/postgresql.conf
cp ${SOURCE_DIR}/srv/postgres/data/pg_hba.conf /srv/postgres/data/pg_hba.conf cp srv/postgres/data/pg_hba.conf /srv/postgres/data/pg_hba.conf
# Enable query logging. Only if the DEBUG environment variable is set # Enable query logging. Only if the DEBUG environment variable is set
if [ ${DEBUG:-0} -eq 1 ]; then if [ ${DEBUG:-0} -eq 1 ]; then
@ -20,5 +20,5 @@ if [ ${DEBUG:-0} -eq 1 ]; then
fi fi
# Install service # Install service
cp ${SOURCE_DIR}/etc/init.d/postgres /etc/init.d/postgres cp etc/init.d/postgres /etc/init.d/postgres
rc-update -u rc-update -u

View File

@ -1,12 +1,12 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
# Create RabbitMQ directory structure # Create RabbitMQ directory structure
mkdir -p /srv/rabbitmq/data mkdir -p /srv/rabbitmq/data
chown 5672:5672 /srv/rabbitmq/data chown 5672:5672 /srv/rabbitmq/data
# Install service # Install service
cp ${SOURCE_DIR}/etc/init.d/rabbitmq /etc/init.d/rabbitmq cp etc/init.d/rabbitmq /etc/init.d/rabbitmq
rc-update -u rc-update -u

View File

@ -1,13 +1,13 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
# Configure Redis # Configure Redis
mkdir -p /srv/redis/conf /srv/redis/data mkdir -p /srv/redis/conf /srv/redis/data
cp ${SOURCE_DIR}/srv/redis/conf/redis.conf /srv/redis/conf/redis.conf cp srv/redis/conf/redis.conf /srv/redis/conf/redis.conf
chown -R 6379:6379 /srv/redis/data chown -R 6379:6379 /srv/redis/data
# Install service # Install service
cp ${SOURCE_DIR}/etc/init.d/redis /etc/init.d/redis cp etc/init.d/redis /etc/init.d/redis
rc-update -u rc-update -u

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
export TEMPLATE=${TEMPLATE:-"default"} export TEMPLATE=${TEMPLATE:-"default"}
# Check prerequisites # Check prerequisites
@ -9,7 +9,7 @@ export TEMPLATE=${TEMPLATE:-"default"}
# Create PostgreSQL user and database # Create PostgreSQL user and database
export SAHANADEMO_PWD=$(head -c 18 /dev/urandom | base64) export SAHANADEMO_PWD=$(head -c 18 /dev/urandom | base64)
envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql
# Prepare persistent directory structure # Prepare persistent directory structure
mkdir -p /srv/sahana-demo/conf /srv/sahana-demo/data/databases /srv/sahana-demo/data/uploads /srv/sahana-demo/data/${TEMPLATE} mkdir -p /srv/sahana-demo/conf /srv/sahana-demo/data/databases /srv/sahana-demo/data/uploads /srv/sahana-demo/data/${TEMPLATE}
@ -21,8 +21,8 @@ cp -rp /var/lib/lxc/sahana/sahana/srv/web2py/applications/eden/modules/templates
export SAHANADEMO_HMAC=$(head -c 18 /dev/urandom | base64) export SAHANADEMO_HMAC=$(head -c 18 /dev/urandom | base64)
export SAHANADEMO_ADMIN_USER=admin@example.com export SAHANADEMO_ADMIN_USER=admin@example.com
export SAHANADEMO_ADMIN_PWD=$(head -c 12 /dev/urandom | base64) export SAHANADEMO_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
envsubst <${SOURCE_DIR}/srv/sahana-demo/conf/000_config.py >/srv/sahana-demo/conf/000_config.py envsubst <srv/sahana-demo/conf/000_config.py >/srv/sahana-demo/conf/000_config.py
envsubst <${SOURCE_DIR}/masterUsers.csv >/var/lib/lxc/sahana/sahana/tmp/masterUsers.csv envsubst <masterUsers.csv >/var/lib/lxc/sahana/sahana/tmp/masterUsers.csv
vmmgr update-login sahana-demo "${SAHANADEMO_ADMIN_USER}" "${SAHANADEMO_ADMIN_PWD}" vmmgr update-login sahana-demo "${SAHANADEMO_ADMIN_USER}" "${SAHANADEMO_ADMIN_PWD}"
# Replace template in LXC container mount definition # Replace template in LXC container mount definition
@ -33,11 +33,11 @@ lxc-execute -u 8001 -g 8001 sahana-demo -- sh -c 'cd /srv/web2py; cp /tmp/master
rm /var/lib/lxc/sahana/sahana/tmp/masterUsers.csv rm /var/lib/lxc/sahana/sahana/tmp/masterUsers.csv
# Install service # Install service
envsubst <${SOURCE_DIR}/etc/init.d/sahana-demo >/etc/init.d/sahana-demo envsubst <etc/init.d/sahana-demo >/etc/init.d/sahana-demo
chmod +x /etc/init.d/sahana-demo chmod +x /etc/init.d/sahana-demo
# Install config update script # Install config update script
cp ${SOURCE_DIR}/srv/sahana-demo/update-conf.sh /srv/sahana-demo/update-conf.sh cp srv/sahana-demo/update-conf.sh /srv/sahana-demo/update-conf.sh
# Stop services required for build # Stop services required for build
[ ! -z ${STOP_POSTGRES} ] && service postgres stop [ ! -z ${STOP_POSTGRES} ] && service postgres stop

View File

@ -1,14 +1,14 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
# Check prerequisites # Check prerequisites
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1 [ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
# Create PostgreSQL user and database # Create PostgreSQL user and database
export SAHANA_PWD=$(head -c 18 /dev/urandom | base64) export SAHANA_PWD=$(head -c 18 /dev/urandom | base64)
envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql
# Prepare persistent directory structure # Prepare persistent directory structure
mkdir -p /srv/sahana/conf /srv/sahana/data/databases /srv/sahana/data/uploads mkdir -p /srv/sahana/conf /srv/sahana/data/databases /srv/sahana/data/uploads
@ -16,16 +16,16 @@ chown -R 8001:8001 /srv/sahana/conf
cp -rp /var/lib/lxc/sahana/sahana/srv/web2py/applications/eden/models/. /srv/sahana/conf cp -rp /var/lib/lxc/sahana/sahana/srv/web2py/applications/eden/models/. /srv/sahana/conf
# Copy Spotter template # Copy Spotter template
cp -r ${SOURCE_DIR}/srv/sahana/data/Spotter /srv/sahana/data/ cp -r srv/sahana/data/Spotter /srv/sahana/data/
chown -R 8001:8001 /srv/sahana/data chown -R 8001:8001 /srv/sahana/data
# Configure Sahana # Configure Sahana
export SAHANA_HMAC=$(head -c 18 /dev/urandom | base64) export SAHANA_HMAC=$(head -c 18 /dev/urandom | base64)
export SAHANA_ADMIN_USER=admin@example.com export SAHANA_ADMIN_USER=admin@example.com
export SAHANA_ADMIN_PWD=$(head -c 12 /dev/urandom | base64) export SAHANA_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
envsubst <${SOURCE_DIR}/srv/sahana/conf/000_config.py >/srv/sahana/conf/000_config.py envsubst <srv/sahana/conf/000_config.py >/srv/sahana/conf/000_config.py
envsubst <${SOURCE_DIR}/srv/sahana/data/Spotter/masterUsers.csv >/srv/sahana/data/Spotter/masterUsers.csv envsubst <srv/sahana/data/Spotter/masterUsers.csv >/srv/sahana/data/Spotter/masterUsers.csv
cp ${SOURCE_DIR}/srv/sahana/conf/00_settings.py /srv/sahana/conf/00_settings.py cp srv/sahana/conf/00_settings.py /srv/sahana/conf/00_settings.py
vmmgr update-login sahana "${SAHANA_ADMIN_USER}" "${SAHANA_ADMIN_PWD}" vmmgr update-login sahana "${SAHANA_ADMIN_USER}" "${SAHANA_ADMIN_PWD}"
# Populate database # Populate database
@ -39,11 +39,11 @@ if [ ${DEBUG:-0} -eq 0 ]; then
fi fi
# Install service # Install service
cp ${SOURCE_DIR}/etc/init.d/sahana /etc/init.d/sahana cp etc/init.d/sahana /etc/init.d/sahana
rc-update -u rc-update -u
# Install config update script # Install config update script
cp ${SOURCE_DIR}/srv/sahana/update-conf.sh /srv/sahana/update-conf.sh cp srv/sahana/update-conf.sh /srv/sahana/update-conf.sh
# Stop services required for build # Stop services required for build
[ ! -z ${STOP_POSTGRES} ] && service postgres stop [ ! -z ${STOP_POSTGRES} ] && service postgres stop

View File

@ -1,14 +1,14 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
# Check prerequisites # Check prerequisites
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1 [ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
# Create PostgreSQL user and database # Create PostgreSQL user and database
export SAMBRO_PWD=$(head -c 18 /dev/urandom | base64) export SAMBRO_PWD=$(head -c 18 /dev/urandom | base64)
envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql
# Prepare persistent directory structure # Prepare persistent directory structure
mkdir -p /srv/sambro/conf /srv/sambro/data/databases /srv/sambro/data/uploads /srv/sambro/data/SAMBRO mkdir -p /srv/sambro/conf /srv/sambro/data/databases /srv/sambro/data/uploads /srv/sambro/data/SAMBRO
@ -20,10 +20,10 @@ cp -rp /var/lib/lxc/sahana/sahana/srv/web2py/applications/eden/modules/templates
export SAMBRO_HMAC=$(head -c 18 /dev/urandom | base64) export SAMBRO_HMAC=$(head -c 18 /dev/urandom | base64)
export SAMBRO_ADMIN_USER=admin@example.com export SAMBRO_ADMIN_USER=admin@example.com
export SAMBRO_ADMIN_PWD=$(head -c 12 /dev/urandom | base64) export SAMBRO_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
envsubst <${SOURCE_DIR}/srv/sambro/conf/000_config.py >/srv/sambro/conf/000_config.py envsubst <srv/sambro/conf/000_config.py >/srv/sambro/conf/000_config.py
envsubst <${SOURCE_DIR}/masterUsers.csv >/var/lib/lxc/sahana/sahana/tmp/masterUsers.csv envsubst <masterUsers.csv >/var/lib/lxc/sahana/sahana/tmp/masterUsers.csv
cp ${SOURCE_DIR}/srv/sambro/conf/00_settings.py /srv/sambro/conf/00_settings.py cp srv/sambro/conf/00_settings.py /srv/sambro/conf/00_settings.py
cp ${SOURCE_DIR}/srv/sambro/data/SAMBRO/config.py /srv/sambro/data/SAMBRO/config.py cp srv/sambro/data/SAMBRO/config.py /srv/sambro/data/SAMBRO/config.py
vmmgr update-login sambro "${SAMBRO_ADMIN_USER}" "${SAMBRO_ADMIN_PWD}" vmmgr update-login sambro "${SAMBRO_ADMIN_USER}" "${SAMBRO_ADMIN_PWD}"
# Populate database # Populate database
@ -38,11 +38,11 @@ if [ ${DEBUG:-0} -eq 0 ]; then
fi fi
# Install service # Install service
cp ${SOURCE_DIR}/etc/init.d/sambro /etc/init.d/sambro cp etc/init.d/sambro /etc/init.d/sambro
rc-update -u rc-update -u
# Install config update script # Install config update script
cp ${SOURCE_DIR}/srv/sambro/update-conf.sh /srv/sambro/update-conf.sh cp srv/sambro/update-conf.sh /srv/sambro/update-conf.sh
# Stop services required for build # Stop services required for build
[ ! -z ${STOP_POSTGRES} ] && service postgres stop [ ! -z ${STOP_POSTGRES} ] && service postgres stop

View File

@ -1,16 +1,16 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
# Check prerequisites # Check prerequisites
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1 [ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
# Populate database # Populate database
export SEEDDMS_PWD=$(head -c 18 /dev/urandom | base64) export SEEDDMS_PWD=$(head -c 18 /dev/urandom | base64)
envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql
cat /var/lib/lxc/seeddms/seeddms/srv/seeddms/create_tables-postgres.sql | lxc-attach postgres -- sh -c "PGPASSWORD=${SEEDDMS_PWD} psql seeddms seeddms" cat /var/lib/lxc/seeddms/seeddms/srv/seeddms/create_tables-postgres.sql | lxc-attach postgres -- sh -c "PGPASSWORD=${SEEDDMS_PWD} psql seeddms seeddms"
cat ${SOURCE_DIR}/custom.sql | lxc-attach -u 5432 -g 5432 postgres -- psql seeddms cat custom.sql | lxc-attach -u 5432 -g 5432 postgres -- psql seeddms
# Copy existing files into persistent storage # Copy existing files into persistent storage
mkdir -p /srv/seeddms/conf /srv/seeddms/data mkdir -p /srv/seeddms/conf /srv/seeddms/data
@ -19,23 +19,23 @@ cp -rp /var/lib/lxc/seeddms/seeddms/srv/seeddms/data/. /srv/seeddms/data
chown -R 8010:8010 /srv/seeddms/data chown -R 8010:8010 /srv/seeddms/data
# Configure SeedDMS # Configure SeedDMS
envsubst <${SOURCE_DIR}/srv/seeddms/conf/settings.xml >/srv/seeddms/conf/settings.xml envsubst <srv/seeddms/conf/settings.xml >/srv/seeddms/conf/settings.xml
export SEEDDMS_ADMIN_USER=admin export SEEDDMS_ADMIN_USER=admin
export SEEDDMS_ADMIN_PWD=$(head -c 12 /dev/urandom | base64) export SEEDDMS_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
export SEEDDMS_ADMIN_EMAIL=admin@example.com export SEEDDMS_ADMIN_EMAIL=admin@example.com
envsubst <${SOURCE_DIR}/adminpwd.sql | lxc-attach -u 5432 -g 5432 postgres -- psql seeddms envsubst <adminpwd.sql | lxc-attach -u 5432 -g 5432 postgres -- psql seeddms
chown -R 8010:8010 /srv/seeddms/conf chown -R 8010:8010 /srv/seeddms/conf
vmmgr update-login seeddms "${SEEDDMS_ADMIN_USER}" "${SEEDDMS_ADMIN_PWD}" vmmgr update-login seeddms "${SEEDDMS_ADMIN_USER}" "${SEEDDMS_ADMIN_PWD}"
# Install cron job # Install cron job
cp ${SOURCE_DIR}/etc/periodic/hourly/seeddms /etc/periodic/hourly/seeddms cp etc/periodic/hourly/seeddms /etc/periodic/hourly/seeddms
# Install service # Install service
cp ${SOURCE_DIR}/etc/init.d/seeddms /etc/init.d/seeddms cp etc/init.d/seeddms /etc/init.d/seeddms
rc-update -u rc-update -u
# Install config update script # Install config update script
cp ${SOURCE_DIR}/srv/seeddms/update-conf.sh /srv/seeddms/update-conf.sh cp srv/seeddms/update-conf.sh /srv/seeddms/update-conf.sh
# Stop services required for build # Stop services required for build
[ ! -z ${STOP_POSTGRES} ] && service postgres stop [ ! -z ${STOP_POSTGRES} ] && service postgres stop

View File

@ -1,20 +1,20 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
# Check prerequisites # Check prerequisites
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1 [ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
# Create database # Create database
export SIGMAH_PWD=$(head -c 18 /dev/urandom | base64) export SIGMAH_PWD=$(head -c 18 /dev/urandom | base64)
envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql envsubst <createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- psql
# Configure Sigmah # Configure Sigmah
mkdir -p /srv/sigmah/conf /srv/sigmah/data/files /srv/sigmah/data/archives mkdir -p /srv/sigmah/conf /srv/sigmah/data/files /srv/sigmah/data/archives
chown -R 8011:8011 /srv/sigmah/data chown -R 8011:8011 /srv/sigmah/data
envsubst <${SOURCE_DIR}/srv/sigmah/conf/persistence.xml >/srv/sigmah/conf/persistence.xml envsubst <srv/sigmah/conf/persistence.xml >/srv/sigmah/conf/persistence.xml
cp ${SOURCE_DIR}/srv/sigmah/conf/sigmah.properties /srv/sigmah/conf/sigmah.properties cp srv/sigmah/conf/sigmah.properties /srv/sigmah/conf/sigmah.properties
cp /var/lib/lxc/sigmah/sigmah/srv/tomcat/webapps/sigmah/sigmah/images/header/org-default-logo.png /srv/sigmah/data/files/logo.png cp /var/lib/lxc/sigmah/sigmah/srv/tomcat/webapps/sigmah/sigmah/images/header/org-default-logo.png /srv/sigmah/data/files/logo.png
# Populate database # Populate database
@ -38,11 +38,11 @@ rm -f /tmp/sigmah-MinimumDataKit.sql /tmp/sigmah-newOrganizationLaunchScript.sql
vmmgr update-login sigmah "${SIGMAH_ADMIN_EMAIL}" "${SIGMAH_ADMIN_PWD}" vmmgr update-login sigmah "${SIGMAH_ADMIN_EMAIL}" "${SIGMAH_ADMIN_PWD}"
# Install service # Install service
cp ${SOURCE_DIR}/etc/init.d/sigmah /etc/init.d/sigmah cp etc/init.d/sigmah /etc/init.d/sigmah
rc-update -u rc-update -u
# Install config update script # Install config update script
cp ${SOURCE_DIR}/srv/sigmah/update-conf.sh /srv/sigmah/update-conf.sh cp srv/sigmah/update-conf.sh /srv/sigmah/update-conf.sh
# Stop services required for build # Stop services required for build
[ ! -z ${STOP_POSTGRES} ] && service postgres stop [ ! -z ${STOP_POSTGRES} ] && service postgres stop

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
# Configure Solr # Configure Solr
mkdir -p /srv/solr/data mkdir -p /srv/solr/data
@ -9,5 +9,5 @@ cp /var/lib/lxc/solr/solr/opt/solr/server/solr/solr.xml /srv/solr/data/solr.xml
chown -R 8983:8983 /srv/solr/data chown -R 8983:8983 /srv/solr/data
# Install service # Install service
cp ${SOURCE_DIR}/etc/init.d/solr /etc/init.d/solr cp etc/init.d/solr /etc/init.d/solr
rc-update -u rc-update -u

View File

@ -1,20 +1,20 @@
#!/bin/sh #!/bin/sh
set -e set -e
SOURCE_DIR=$(realpath $(dirname "${0}"))/setup cd $(realpath $(dirname "${0}"))/setup
# Check prerequisites # Check prerequisites
[ ! -e /run/openrc/started/mariadb ] && service mariadb start && STOP_MARIADB=1 [ ! -e /run/openrc/started/mariadb ] && service mariadb start && STOP_MARIADB=1
# Create database # Create database
export USHAHIDI_PWD=$(head -c 18 /dev/urandom | base64) export USHAHIDI_PWD=$(head -c 18 /dev/urandom | base64)
envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach mariadb -- mysql envsubst <createdb.sql | lxc-attach mariadb -- mysql
# Configure Ushahidi # Configure Ushahidi
mkdir -p /srv/ushahidi/conf /srv/ushahidi/data mkdir -p /srv/ushahidi/conf /srv/ushahidi/data
chown 8014:8014 /srv/ushahidi/data chown 8014:8014 /srv/ushahidi/data
envsubst <${SOURCE_DIR}/srv/ushahidi/conf/env >/srv/ushahidi/conf/env envsubst <srv/ushahidi/conf/env >/srv/ushahidi/conf/env
cp ${SOURCE_DIR}/srv/ushahidi/conf/config.json /srv/ushahidi/conf/config.json cp srv/ushahidi/conf/config.json /srv/ushahidi/conf/config.json
# Populate database # Populate database
lxc-execute ushahidi -- /srv/ushahidi/platform/bin/phinx migrate -c /srv/ushahidi/platform/application/phinx.php lxc-execute ushahidi -- /srv/ushahidi/platform/bin/phinx migrate -c /srv/ushahidi/platform/application/phinx.php
@ -23,18 +23,18 @@ lxc-execute ushahidi -- /srv/ushahidi/platform/bin/phinx migrate -c /srv/ushahid
export USHAHIDI_ADMIN_USER=admin@example.com export USHAHIDI_ADMIN_USER=admin@example.com
export USHAHIDI_ADMIN_PWD=$(head -c 12 /dev/urandom | base64) export USHAHIDI_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
export USHAHIDI_ADMIN_HASH=$(python3 -c "import bcrypt; print(bcrypt.hashpw('${USHAHIDI_ADMIN_PWD}'.encode(), bcrypt.gensalt()).decode().replace('2b', '2y'))") export USHAHIDI_ADMIN_HASH=$(python3 -c "import bcrypt; print(bcrypt.hashpw('${USHAHIDI_ADMIN_PWD}'.encode(), bcrypt.gensalt()).decode().replace('2b', '2y'))")
envsubst <${SOURCE_DIR}/adminpwd.sql | lxc-attach mariadb -- mysql ushahidi envsubst <adminpwd.sql | lxc-attach mariadb -- mysql ushahidi
vmmgr update-login ushahidi "${USHAHIDI_ADMIN_USER}" "${USHAHIDI_ADMIN_PWD}" vmmgr update-login ushahidi "${USHAHIDI_ADMIN_USER}" "${USHAHIDI_ADMIN_PWD}"
# Install cron job # Install cron job
cp ${SOURCE_DIR}/etc/periodic/15min/ushahidi /etc/periodic/15min/ushahidi cp etc/periodic/15min/ushahidi /etc/periodic/15min/ushahidi
# Install service # Install service
cp ${SOURCE_DIR}/etc/init.d/ushahidi /etc/init.d/ushahidi cp etc/init.d/ushahidi /etc/init.d/ushahidi
rc-update -u rc-update -u
# Install config update script # Install config update script
cp ${SOURCE_DIR}/srv/ushahidi/update-conf.sh /srv/ushahidi/update-conf.sh cp srv/ushahidi/update-conf.sh /srv/ushahidi/update-conf.sh
# Stop services required for build # Stop services required for build
[ ! -z ${STOP_MARIADB} ] && service mariadb stop [ ! -z ${STOP_MARIADB} ] && service mariadb stop