Put config update script installation to the end of setup
This commit is contained in:
parent
011cf4356b
commit
96249760fd
@ -5,7 +5,6 @@ SOURCE_DIR=$(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/update-conf.sh /srv/ckan-datapusher/update-conf.sh
|
|
||||||
cp ${SOURCE_DIR}/srv/ckan-datapusher/conf/datapusher.wsgi /srv/ckan-datapusher/conf/datapusher.wsgi
|
cp ${SOURCE_DIR}/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 ${SOURCE_DIR}/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
|
||||||
@ -13,3 +12,6 @@ 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 ${SOURCE_DIR}/etc/init.d/ckan-datapusher /etc/init.d/ckan-datapusher
|
||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
|
# Install config update script
|
||||||
|
cp ${SOURCE_DIR}/srv/ckan-datapusher/update-conf.sh /srv/ckan-datapusher/update-conf.sh
|
||||||
|
@ -22,7 +22,6 @@ service solr restart
|
|||||||
|
|
||||||
# Configure CKAN
|
# Configure CKAN
|
||||||
mkdir -p /srv/ckan/conf /srv/ckan/data
|
mkdir -p /srv/ckan/conf /srv/ckan/data
|
||||||
cp ${SOURCE_DIR}/srv/ckan/update-conf.sh /srv/ckan/update-conf.sh
|
|
||||||
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 <${SOURCE_DIR}/srv/ckan/conf/ckan.ini >/srv/ckan/conf/ckan.ini
|
||||||
@ -56,6 +55,9 @@ cp ${SOURCE_DIR}/etc/periodic/hourly/ckan /etc/periodic/hourly/ckan
|
|||||||
cp ${SOURCE_DIR}/etc/init.d/ckan /etc/init.d/ckan
|
cp ${SOURCE_DIR}/etc/init.d/ckan /etc/init.d/ckan
|
||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
|
# Install config update script
|
||||||
|
cp ${SOURCE_DIR}/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
|
||||||
[ ! -z ${STOP_REDIS} ] && service redis stop
|
[ ! -z ${STOP_REDIS} ] && service redis stop
|
||||||
|
@ -16,7 +16,6 @@ chown 8005:8005 /srv/crisiscleanup/conf
|
|||||||
cp -r /var/lib/lxc/crisiscleanup/crisiscleanup/srv/crisiscleanup/config/. /srv/crisiscleanup/conf
|
cp -r /var/lib/lxc/crisiscleanup/crisiscleanup/srv/crisiscleanup/config/. /srv/crisiscleanup/conf
|
||||||
|
|
||||||
# Configure CrisisCleanup
|
# Configure CrisisCleanup
|
||||||
cp ${SOURCE_DIR}/srv/crisiscleanup/update-conf.sh /srv/crisiscleanup/update-conf.sh
|
|
||||||
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)
|
||||||
@ -35,5 +34,8 @@ lxc-execute crisiscleanup -- rake db:seed
|
|||||||
cp ${SOURCE_DIR}/etc/init.d/crisiscleanup /etc/init.d/crisiscleanup
|
cp ${SOURCE_DIR}/etc/init.d/crisiscleanup /etc/init.d/crisiscleanup
|
||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
|
# Install config update script
|
||||||
|
cp ${SOURCE_DIR}/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
|
||||||
|
@ -15,7 +15,6 @@ mkdir -p /srv/cts/conf
|
|||||||
cp /var/lib/lxc/cts/cts/srv/cts/cts/settings/base.py /srv/cts/conf
|
cp /var/lib/lxc/cts/cts/srv/cts/cts/settings/base.py /srv/cts/conf
|
||||||
|
|
||||||
# Configure CTS
|
# Configure CTS
|
||||||
cp ${SOURCE_DIR}/srv/cts/update-conf.sh /srv/cts/update-conf.sh
|
|
||||||
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 <${SOURCE_DIR}/srv/cts/conf/spotter.py >/srv/cts/conf/spotter.py
|
||||||
touch /srv/cts/conf/__init__.py
|
touch /srv/cts/conf/__init__.py
|
||||||
@ -40,5 +39,8 @@ vmmgr update-login cts "${CTS_ADMIN_EMAIL}" "${CTS_ADMIN_PWD}"
|
|||||||
cp ${SOURCE_DIR}/etc/init.d/cts /etc/init.d/cts
|
cp ${SOURCE_DIR}/etc/init.d/cts /etc/init.d/cts
|
||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
|
# Install config update script
|
||||||
|
cp ${SOURCE_DIR}/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
|
||||||
|
@ -12,7 +12,6 @@ envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- ps
|
|||||||
|
|
||||||
# Configure GNU Health
|
# Configure GNU Health
|
||||||
mkdir -p /srv/gnuhealth/conf/
|
mkdir -p /srv/gnuhealth/conf/
|
||||||
cp ${SOURCE_DIR}/srv/gnuhealth/update-conf.sh /srv/gnuhealth/update-conf.sh
|
|
||||||
envsubst <${SOURCE_DIR}/srv/gnuhealth/conf/trytond.conf >/srv/gnuhealth/conf/trytond.conf
|
envsubst <${SOURCE_DIR}/srv/gnuhealth/conf/trytond.conf >/srv/gnuhealth/conf/trytond.conf
|
||||||
|
|
||||||
# Populate database
|
# Populate database
|
||||||
@ -32,5 +31,8 @@ rm -f /tmp/gnuhealth_demo.sql.gz
|
|||||||
cp ${SOURCE_DIR}/etc/init.d/gnuhealth /etc/init.d/gnuhealth
|
cp ${SOURCE_DIR}/etc/init.d/gnuhealth /etc/init.d/gnuhealth
|
||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
|
# Install config update script
|
||||||
|
cp ${SOURCE_DIR}/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
|
||||||
|
@ -13,7 +13,6 @@ cat /var/lib/lxc/kanboard/kanboard/srv/kanboard/app/Schema/Sql/postgres.sql | lx
|
|||||||
|
|
||||||
# Configure Kanboard
|
# Configure Kanboard
|
||||||
mkdir -p /srv/kanboard/conf /srv/kanboard/data
|
mkdir -p /srv/kanboard/conf /srv/kanboard/data
|
||||||
cp ${SOURCE_DIR}/srv/kanboard/update-conf.sh /srv/kanboard/update-conf.sh
|
|
||||||
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 <${SOURCE_DIR}/srv/kanboard/conf/config.php >/srv/kanboard/conf/config.php
|
||||||
export KANBOARD_ADMIN_USER=admin
|
export KANBOARD_ADMIN_USER=admin
|
||||||
@ -22,12 +21,15 @@ export KANBOARD_ADMIN_HASH=$(python3 -c "import bcrypt; print(bcrypt.hashpw('${K
|
|||||||
envsubst <${SOURCE_DIR}/adminpwd.sql | lxc-attach -u 5432 -g 5432 postgres -- psql kanboard
|
envsubst <${SOURCE_DIR}/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
|
||||||
|
cp ${SOURCE_DIR}/etc/periodic/daily/kanboard /etc/periodic/daily/kanboard
|
||||||
|
|
||||||
# Install service
|
# Install service
|
||||||
cp ${SOURCE_DIR}/etc/init.d/kanboard /etc/init.d/kanboard
|
cp ${SOURCE_DIR}/etc/init.d/kanboard /etc/init.d/kanboard
|
||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
# Install cron job
|
# Install config update script
|
||||||
cp ${SOURCE_DIR}/etc/periodic/daily/kanboard /etc/periodic/daily/kanboard
|
cp ${SOURCE_DIR}/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
|
||||||
|
@ -16,7 +16,6 @@ envsubst <${SOURCE_DIR}/schemapwd.sql | lxc-attach mariadb -- mysql mifosplatfor
|
|||||||
|
|
||||||
# Configure Mifos X
|
# Configure Mifos X
|
||||||
mkdir -p /srv/mifosx/conf
|
mkdir -p /srv/mifosx/conf
|
||||||
cp ${SOURCE_DIR}/srv/mifosx/update-conf.sh /srv/mifosx/update-conf.sh
|
|
||||||
envsubst <${SOURCE_DIR}/srv/mifosx/conf/context.xml >/srv/mifosx/conf/context.xml
|
envsubst <${SOURCE_DIR}/srv/mifosx/conf/context.xml >/srv/mifosx/conf/context.xml
|
||||||
cp ${SOURCE_DIR}/srv/mifosx/conf/server.xml /srv/mifosx/conf/server.xml
|
cp ${SOURCE_DIR}/srv/mifosx/conf/server.xml /srv/mifosx/conf/server.xml
|
||||||
|
|
||||||
@ -42,5 +41,8 @@ export MIFOSX_ADMIN_HASH=$(echo -n "${MIFOSX_ADMIN_PWD}{1}" | sha256sum | awk '{
|
|||||||
envsubst <${SOURCE_DIR}/adminpwd.sql | lxc-attach mariadb -- mysql mifostenant-default
|
envsubst <${SOURCE_DIR}/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
|
||||||
|
cp ${SOURCE_DIR}/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
|
||||||
|
@ -3,5 +3,5 @@
|
|||||||
sed -i "s|\(^\s\+proxyName=\).*|\1\"${DOMAIN}\"|" /srv/mifosx/conf/server.xml
|
sed -i "s|\(^\s\+proxyName=\).*|\1\"${DOMAIN}\"|" /srv/mifosx/conf/server.xml
|
||||||
sed -i "s|\(^\s\+proxyPort=\).*|\1\"${PORT}\"|" /srv/mifosx/conf/server.xml
|
sed -i "s|\(^\s\+proxyPort=\).*|\1\"${PORT}\"|" /srv/mifosx/conf/server.xml
|
||||||
|
|
||||||
QUERY="UPDATE \`c_external_service_properties\` SET `value` = '${EMAIL}' WHERE \`external_service_id\` = 2 and \`name\` LIKE 'username'"
|
QUERY="UPDATE \`c_external_service_properties\` SET \`value\` = '${EMAIL}' WHERE \`external_service_id\` = 2 and \`name\` LIKE 'username'"
|
||||||
lxc-attach mariadb -- mysql -e "${QUERY}" mifostenant-default
|
lxc-attach mariadb -- mysql -e "${QUERY}" mifostenant-default
|
||||||
|
@ -13,7 +13,6 @@ envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- ps
|
|||||||
|
|
||||||
# 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
|
||||||
cp ${SOURCE_DIR}/srv/motech/update-conf.sh /srv/motech/update-conf.sh
|
|
||||||
envsubst <${SOURCE_DIR}/srv/motech/conf/config/bootstrap.properties >/srv/motech/conf/config/bootstrap.properties
|
envsubst <${SOURCE_DIR}/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 ${SOURCE_DIR}/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 ${SOURCE_DIR}/srv/motech/conf/config/motech-settings.properties /srv/motech/conf/config/motech-settings.properties
|
||||||
@ -38,6 +37,9 @@ curl -H "Content-Type: application/json" -X POST -d "{\"adminLogin\":\"${MOTECH_
|
|||||||
service motech stop
|
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
|
||||||
|
cp ${SOURCE_DIR}/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
|
||||||
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
||||||
|
@ -12,7 +12,6 @@ envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- ps
|
|||||||
|
|
||||||
# Configure OpenDataKit
|
# Configure OpenDataKit
|
||||||
mkdir -p /srv/opendatakit/conf
|
mkdir -p /srv/opendatakit/conf
|
||||||
cp ${SOURCE_DIR}/srv/opendatakit/update-conf.sh /srv/opendatakit/update-conf.sh
|
|
||||||
envsubst <${SOURCE_DIR}/srv/opendatakit/conf/jdbc.properties >/srv/opendatakit/conf/jdbc.properties
|
envsubst <${SOURCE_DIR}/srv/opendatakit/conf/jdbc.properties >/srv/opendatakit/conf/jdbc.properties
|
||||||
envsubst <${SOURCE_DIR}/srv/opendatakit/conf/security.properties >/srv/opendatakit/conf/security.properties
|
envsubst <${SOURCE_DIR}/srv/opendatakit/conf/security.properties >/srv/opendatakit/conf/security.properties
|
||||||
cp ${SOURCE_DIR}/srv/opendatakit/conf/server.xml /srv/opendatakit/conf/server.xml
|
cp ${SOURCE_DIR}/srv/opendatakit/conf/server.xml /srv/opendatakit/conf/server.xml
|
||||||
@ -39,5 +38,8 @@ export OPENDATAKIT_ADMIN_DIGEST_HASH=$(echo -n "${OPENDATAKIT_ADMIN_USER}:${OPEN
|
|||||||
envsubst <${SOURCE_DIR}/adminpwd.sql | lxc-attach -u 5432 -g 5432 postgres -- psql opendatakit
|
envsubst <${SOURCE_DIR}/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
|
||||||
|
cp ${SOURCE_DIR}/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
|
||||||
|
@ -19,7 +19,6 @@ lxc-attach rabbitmq -- rabbitmqctl set_permissions -p /pandora pandora ".*" ".*"
|
|||||||
|
|
||||||
# Configure Pandora
|
# Configure Pandora
|
||||||
mkdir -p /srv/pandora/conf /srv/pandora/data
|
mkdir -p /srv/pandora/conf /srv/pandora/data
|
||||||
cp ${SOURCE_DIR}/srv/pandora/update-conf.sh /srv/pandora/update-conf.sh
|
|
||||||
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
|
||||||
@ -54,6 +53,9 @@ vmmgr update-login pandora "${PANDORA_ADMIN_USER}" "${PANDORA_ADMIN_PWD}"
|
|||||||
cp ${SOURCE_DIR}/etc/init.d/pandora /etc/init.d/pandora
|
cp ${SOURCE_DIR}/etc/init.d/pandora /etc/init.d/pandora
|
||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
|
# Install config update script
|
||||||
|
cp ${SOURCE_DIR}/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
|
||||||
[ ! -z ${STOP_RABBITMQ} ] && service rabbitmq stop
|
[ ! -z ${STOP_RABBITMQ} ] && service rabbitmq stop
|
||||||
|
@ -18,7 +18,6 @@ cp -rp /var/lib/lxc/sahana/sahana/srv/web2py/applications/eden/models/. /srv/sah
|
|||||||
cp -rp /var/lib/lxc/sahana/sahana/srv/web2py/applications/eden/modules/templates/${TEMPLATE}/. /srv/sahana-demo/data/${TEMPLATE}
|
cp -rp /var/lib/lxc/sahana/sahana/srv/web2py/applications/eden/modules/templates/${TEMPLATE}/. /srv/sahana-demo/data/${TEMPLATE}
|
||||||
|
|
||||||
# Configure Sahana
|
# Configure Sahana
|
||||||
cp ${SOURCE_DIR}/srv/sahana-demo/update-conf.sh /srv/sahana-demo/update-conf.sh
|
|
||||||
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)
|
||||||
@ -37,5 +36,8 @@ rm /var/lib/lxc/sahana/sahana/tmp/masterUsers.csv
|
|||||||
envsubst <${SOURCE_DIR}/etc/init.d/sahana-demo >/etc/init.d/sahana-demo
|
envsubst <${SOURCE_DIR}/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
|
||||||
|
cp ${SOURCE_DIR}/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
|
||||||
|
@ -20,7 +20,6 @@ cp -r ${SOURCE_DIR}/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
|
||||||
cp ${SOURCE_DIR}/srv/sahana/update-conf.sh /srv/sahana/update-conf.sh
|
|
||||||
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)
|
||||||
@ -43,5 +42,8 @@ fi
|
|||||||
cp ${SOURCE_DIR}/etc/init.d/sahana /etc/init.d/sahana
|
cp ${SOURCE_DIR}/etc/init.d/sahana /etc/init.d/sahana
|
||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
|
# Install config update script
|
||||||
|
cp ${SOURCE_DIR}/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
|
||||||
|
@ -17,7 +17,6 @@ cp -rp /var/lib/lxc/sahana/sahana/srv/web2py/applications/eden/models/. /srv/sah
|
|||||||
cp -rp /var/lib/lxc/sahana/sahana/srv/web2py/applications/eden/modules/templates/SAMBRO/. /srv/sahana-demo/data/SAMBRO
|
cp -rp /var/lib/lxc/sahana/sahana/srv/web2py/applications/eden/modules/templates/SAMBRO/. /srv/sahana-demo/data/SAMBRO
|
||||||
|
|
||||||
# Configure SAMBRO
|
# Configure SAMBRO
|
||||||
cp ${SOURCE_DIR}/srv/sambro/update-conf.sh /srv/sambro/update-conf.sh
|
|
||||||
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)
|
||||||
@ -42,5 +41,8 @@ fi
|
|||||||
cp ${SOURCE_DIR}/etc/init.d/sambro /etc/init.d/sambro
|
cp ${SOURCE_DIR}/etc/init.d/sambro /etc/init.d/sambro
|
||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
|
# Install config update script
|
||||||
|
cp ${SOURCE_DIR}/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
|
||||||
|
@ -19,7 +19,6 @@ 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
|
||||||
cp ${SOURCE_DIR}/srv/seeddms/update-conf.sh /srv/seeddms/update-conf.sh
|
|
||||||
envsubst <${SOURCE_DIR}/srv/seeddms/conf/settings.xml >/srv/seeddms/conf/settings.xml
|
envsubst <${SOURCE_DIR}/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)
|
||||||
@ -28,12 +27,15 @@ envsubst <${SOURCE_DIR}/adminpwd.sql | lxc-attach -u 5432 -g 5432 postgres -- ps
|
|||||||
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
|
||||||
|
cp ${SOURCE_DIR}/etc/periodic/hourly/seeddms /etc/periodic/hourly/seeddms
|
||||||
|
|
||||||
# Install service
|
# Install service
|
||||||
cp ${SOURCE_DIR}/etc/init.d/seeddms /etc/init.d/seeddms
|
cp ${SOURCE_DIR}/etc/init.d/seeddms /etc/init.d/seeddms
|
||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
# Install cron job
|
# Install config update script
|
||||||
cp ${SOURCE_DIR}/etc/periodic/hourly/seeddms /etc/periodic/hourly/seeddms
|
cp ${SOURCE_DIR}/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
|
||||||
|
@ -12,7 +12,6 @@ envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- ps
|
|||||||
|
|
||||||
# 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
|
||||||
cp ${SOURCE_DIR}/srv/sigmah/update-conf.sh /srv/sigmah/update-conf.sh
|
|
||||||
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 <${SOURCE_DIR}/srv/sigmah/conf/persistence.xml >/srv/sigmah/conf/persistence.xml
|
||||||
cp ${SOURCE_DIR}/srv/sigmah/conf/sigmah.properties /srv/sigmah/conf/sigmah.properties
|
cp ${SOURCE_DIR}/srv/sigmah/conf/sigmah.properties /srv/sigmah/conf/sigmah.properties
|
||||||
@ -42,5 +41,8 @@ vmmgr update-login sigmah "${SIGMAH_ADMIN_EMAIL}" "${SIGMAH_ADMIN_PWD}"
|
|||||||
cp ${SOURCE_DIR}/etc/init.d/sigmah /etc/init.d/sigmah
|
cp ${SOURCE_DIR}/etc/init.d/sigmah /etc/init.d/sigmah
|
||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
|
# Install config update script
|
||||||
|
cp ${SOURCE_DIR}/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
|
||||||
|
@ -12,7 +12,6 @@ envsubst <${SOURCE_DIR}/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
|
||||||
cp ${SOURCE_DIR}/srv/ushahidi/update-conf.sh /srv/ushahidi/update-conf.sh
|
|
||||||
chown 8014:8014 /srv/ushahidi/data
|
chown 8014:8014 /srv/ushahidi/data
|
||||||
envsubst <${SOURCE_DIR}/srv/ushahidi/conf/env >/srv/ushahidi/conf/env
|
envsubst <${SOURCE_DIR}/srv/ushahidi/conf/env >/srv/ushahidi/conf/env
|
||||||
cp ${SOURCE_DIR}/srv/ushahidi/conf/config.json /srv/ushahidi/conf/config.json
|
cp ${SOURCE_DIR}/srv/ushahidi/conf/config.json /srv/ushahidi/conf/config.json
|
||||||
@ -27,12 +26,15 @@ export USHAHIDI_ADMIN_HASH=$(python3 -c "import bcrypt; print(bcrypt.hashpw('${U
|
|||||||
envsubst <${SOURCE_DIR}/adminpwd.sql | lxc-attach mariadb -- mysql ushahidi
|
envsubst <${SOURCE_DIR}/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
|
||||||
|
cp ${SOURCE_DIR}/etc/periodic/15min/ushahidi /etc/periodic/15min/ushahidi
|
||||||
|
|
||||||
# Install service
|
# Install service
|
||||||
cp ${SOURCE_DIR}/etc/init.d/ushahidi /etc/init.d/ushahidi
|
cp ${SOURCE_DIR}/etc/init.d/ushahidi /etc/init.d/ushahidi
|
||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
# Install cron job
|
# Install config update script
|
||||||
cp ${SOURCE_DIR}/etc/periodic/15min/ushahidi /etc/periodic/15min/ushahidi
|
cp ${SOURCE_DIR}/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
|
||||||
|
Loading…
Reference in New Issue
Block a user