diff --git a/basic.sh b/basic.sh index 9906c25..163c587 100755 --- a/basic.sh +++ b/basic.sh @@ -78,5 +78,5 @@ if [ ${DEBUG:-0} -eq 1 ]; then service sshd start fi -# Set dummy host and generate related files +# Generate nginx default.conf vmmgr update-host spotter.vm 443 diff --git a/ckan/setup/srv/ckan/update-conf.sh b/ckan/setup/srv/ckan/update-conf.sh index 9a13f3e..49ae9b9 100755 --- a/ckan/setup/srv/ckan/update-conf.sh +++ b/ckan/setup/srv/ckan/update-conf.sh @@ -2,7 +2,7 @@ HOST="${DOMAIN}" [ "${PORT}" != "443" ] && HOST="${DOMAIN}:${PORT}" -sed -i "s|\(^ckan\.site_url = \).*|\1https://${HOST}|" /srv/ckan/conf/ckan.ini +sed -i "s|\(^ckan\.site_url = \).*|\1https://ckan.${HOST}|" /srv/ckan/conf/ckan.ini sed -i "s|\(^smtp\.mail_from = \).*|\1${EMAIL}|" /srv/ckan/conf/ckan.ini sed -i "s|\(^ckanext\.geoview\.gapi_key = \).*|\1${GMAPS_API_KEY}|" /srv/ckan/conf/ckan.ini diff --git a/mifosx/setup/srv/mifosx/update-conf.sh b/mifosx/setup/srv/mifosx/update-conf.sh index 231ac61..ae98853 100755 --- a/mifosx/setup/srv/mifosx/update-conf.sh +++ b/mifosx/setup/srv/mifosx/update-conf.sh @@ -1,6 +1,6 @@ #!/bin/sh -sed -i "s|\(^\s\+proxyName=\).*|\1\"${DOMAIN}\"|" /srv/mifosx/conf/server.xml +sed -i "s|\(^\s\+proxyName=\).*|\1\"mifosx.${DOMAIN}\"|" /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'" diff --git a/opendatakit/setup.sh b/opendatakit/setup.sh index 802b929..4a0e44e 100755 --- a/opendatakit/setup.sh +++ b/opendatakit/setup.sh @@ -12,6 +12,8 @@ envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- ps # Configure OpenDataKit mkdir -p /srv/opendatakit/conf +export OPENDATAKIT_ADMIN_USER=admin +export OPENDATAKIT_ADMIN_REALM=spotter 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 cp ${SOURCE_DIR}/srv/opendatakit/conf/server.xml /srv/opendatakit/conf/server.xml @@ -29,8 +31,6 @@ done service opendatakit stop # Update admin account -export OPENDATAKIT_ADMIN_USER=admin -export OPENDATAKIT_ADMIN_REALM=spotter 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_BASIC_HASH=$(echo -n "${OPENDATAKIT_ADMIN_PWD}{${OPENDATAKIT_ADMIN_SALT}}" | sha1sum | tr -d " -") diff --git a/opendatakit/setup/srv/opendatakit/update-conf.sh b/opendatakit/setup/srv/opendatakit/update-conf.sh index 0d84c5e..bbe857f 100755 --- a/opendatakit/setup/srv/opendatakit/update-conf.sh +++ b/opendatakit/setup/srv/opendatakit/update-conf.sh @@ -1,5 +1,5 @@ #!/bin/sh -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\+proxyName=\).*|\1\"odk.${DOMAIN}\"|" /srv/opendatakit/conf/server.xml +sed -i "s|\(^\s\+proxyPort=\).*|\1\"${PORT}\"|" /srv/opendatakit/conf/server.xml sed -i "s|\(^security\.server\.securePort=\).*|\1${PORT}|" /srv/opendatakit/conf/security.properties diff --git a/sahana-demo/setup/srv/sahana-demo/update-conf.sh b/sahana-demo/setup/srv/sahana-demo/update-conf.sh index 34b7687..d6c2771 100755 --- a/sahana-demo/setup/srv/sahana-demo/update-conf.sh +++ b/sahana-demo/setup/srv/sahana-demo/update-conf.sh @@ -2,7 +2,7 @@ HOST="${DOMAIN}" [ "${PORT}" != "443" ] && HOST="${PORT}:${DOMAIN}" -sed -i "s|\(^settings\.base\.public_url = \).*|\1\"https://sahana.${HOST}\"|" /srv/sahana-demo/conf/000_config.py +sed -i "s|\(^settings\.base\.public_url = \).*|\1\"https://sahana-demo.${HOST}\"|" /srv/sahana-demo/conf/000_config.py sed -i "s|\(^settings\.mail\.sender = \).*|\1\"${EMAIL}\"|" /srv/sahana-demo/conf/000_config.py sed -i "s|\(^settings\.mail\.approver = \).*|\1\"${EMAIL}\"|" /srv/sahana-demo/conf/000_config.py diff --git a/sambro/setup.sh b/sambro/setup.sh index 46d702a..0dcc639 100755 --- a/sambro/setup.sh +++ b/sambro/setup.sh @@ -13,8 +13,8 @@ envsubst <${SOURCE_DIR}/createdb.sql | lxc-attach -u 5432 -g 5432 postgres -- ps # Prepare persistent directory structure mkdir -p /srv/sambro/conf /srv/sambro/data/databases /srv/sambro/data/uploads /srv/sambro/data/SAMBRO chown -R 8001:8001 /srv/sambro/conf /srv/sambro/data -cp -rp /var/lib/lxc/sahana/sahana/srv/web2py/applications/eden/models/. /srv/sahana-demo/conf -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/models/. /srv/sambro/conf +cp -rp /var/lib/lxc/sahana/sahana/srv/web2py/applications/eden/modules/templates/SAMBRO/. /srv/sambro/data/SAMBRO # Configure SAMBRO export SAMBRO_HMAC=$(head -c 18 /dev/urandom | base64) diff --git a/sambro/setup/srv/sambro/update-conf.sh b/sambro/setup/srv/sambro/update-conf.sh index 5cb0597..3c06180 100755 --- a/sambro/setup/srv/sambro/update-conf.sh +++ b/sambro/setup/srv/sambro/update-conf.sh @@ -2,7 +2,7 @@ HOST="${DOMAIN}" [ "${PORT}" != "443" ] && HOST="${PORT}:${DOMAIN}" -sed -i "s|\(^settings\.base\.public_url = \).*|\1\"https://sahana.${HOST}\"|" /srv/sambro/conf/000_config.py +sed -i "s|\(^settings\.base\.public_url = \).*|\1\"https://sambro.${HOST}\"|" /srv/sambro/conf/000_config.py sed -i "s|\(^settings\.mail\.sender = \).*|\1\"${EMAIL}\"|" /srv/sambro/conf/000_config.py sed -i "s|\(^settings\.mail\.approver = \).*|\1\"${EMAIL}\"|" /srv/sambro/conf/000_config.py