Update update-conf.sh, revert custom prop definitions

Partially reverts 0028a3ba5b
This commit is contained in:
Disassembler 2020-04-10 13:03:34 +02:00
parent 0028a3ba5b
commit a12b0f101e
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
31 changed files with 131 additions and 77 deletions

@ -1 +1 @@
Subproject commit 2ae06a4e4741b4c443b71dab59eba3abcec4ba2b Subproject commit 2d788eb704982e0eef88ccb218417cc6ad9c442e

View File

@ -80,5 +80,3 @@ spoc-container stop ckan-redis
# Register application # Register application
vmmgr register-app ckan ckan "${CKAN_ADMIN_USER}" "${CKAN_ADMIN_PWD}" vmmgr register-app ckan ckan "${CKAN_ADMIN_USER}" "${CKAN_ADMIN_PWD}"
vmmgr register-prop ckan email "${CKAN_ADMIN_EMAIL}"
vmmgr register-prop ckan gmaps-api-key ""

View File

@ -1,10 +1,17 @@
#!/bin/sh #!/bin/sh
HOST="${DOMAIN}" # Volumes
[ "${PORT}" != "443" ] && HOST="${DOMAIN}:${PORT}" DATAPUSHER_CONF="${VOLUMES_DIR}/ckan/datapusher_conf"
sed -i "s|\(^ckan\.site_url = \).*|\1https://ckan.${HOST}|" /srv/ckan/ckan_conf/ckan.ini CKAN_CONF="${VOLUMES_DIR}/ckan/ckan_conf"
sed -i "s|\(^smtp\.mail_from = \).*|\1${EMAIL}|" /srv/ckan/ckan_conf/ckan.ini # Variables
sed -i "s|\(^ckanext\.geoview\.gapi_key = \).*|\1${GMAPS_API_KEY}|" /srv/ckan/ckan_conf/ckan.ini HOST="${HOST}.${DOMAIN}"
[ "${PORT}" != "443" ] && HOST="${HOST}:${PORT}"
sed -i "s|\(^FROM_EMAIL = \).*|\1'${EMAIL}'|" /srv/ckan/datapusher_conf/datapusher_settings.py # Replacements
sed -i "s|\(^ckan\.site_url = \).*|\1https://${HOST}|" ${CKAN_CONF}/ckan.ini
sed -i "s|\(^smtp\.mail_from = \).*|\1${EMAIL}|" ${CKAN_CONF}/ckan.ini
sed -i "s|\(^ckanext\.geoview\.gapi_key = \).*|\1${GMAPS_API_KEY}|" ${CKAN_CONF}/ckan.ini
sed -i "s|\(^FROM_EMAIL = \).*|\1'${EMAIL}'|" ${DATAPUSHER_CONF}/datapusher_settings.py

View File

@ -42,5 +42,3 @@ spoc-container stop crisiscleanup-postgres
# Register application # Register application
vmmgr register-app crisiscleanup cc "${CRISISCLEANUP_ADMIN_EMAIL}" "${CRISISCLEANUP_ADMIN_PWD}" vmmgr register-app crisiscleanup cc "${CRISISCLEANUP_ADMIN_EMAIL}" "${CRISISCLEANUP_ADMIN_PWD}"
vmmgr register-prop crisiscleanup email "${CRISISCLEANUP_ADMIN_EMAIL}"
vmmgr register-prop crisiscleanup gmaps-api-key ""

View File

@ -1,4 +1,8 @@
#!/bin/sh #!/bin/sh
sed -i "s|\(^ config\.mailer_sender = \).*|\1'${EMAIL}'|" /srv/crisiscleanup/cc_conf/initializers/devise.rb # Volumes
sed -i "s|\(^ENV['GOOGLE_MAPS_API_KEY'] = \).*|\1${GMAPS_API_KEY}|" /srv/crisiscleanup/cc_conf/boot.rb CC_CONF="${VOLUMES_DIR}/crisiscleanup/cc_conf"
# Replacements
sed -i "s|\(^ config\.mailer_sender = \).*|\1'${EMAIL}'|" ${CC_CONF}/initializers/devise.rb
sed -i "s|\(^ENV['GOOGLE_MAPS_API_KEY'] = \).*|\1${GMAPS_API_KEY}|" ${CC_CONF}/boot.rb

View File

@ -42,4 +42,3 @@ spoc-container stop cts-postgres
# Register application # Register application
vmmgr register-app cts cts "${CTS_ADMIN_EMAIL}" "${CTS_ADMIN_PWD}" vmmgr register-app cts cts "${CTS_ADMIN_EMAIL}" "${CTS_ADMIN_PWD}"
vmmgr register-prop cts email "${CTS_ADMIN_EMAIL}"

View File

@ -1,3 +1,7 @@
#!/bin/sh #!/bin/sh
sed -i "s|\(^SERVER_EMAIL = \).*|\1'${EMAIL}'|" /srv/cts/cts_conf/spotter.py # Volumes
CTS_CONF="${VOLUMES_DIR}/cts/cts_conf"
# Replacements
sed -i "s|\(^SERVER_EMAIL = \).*|\1'${EMAIL}'|" ${CTS_CONF}/spotter.py

View File

@ -36,4 +36,3 @@ spoc-container stop gnuhealth-postgres
# Register application # Register application
vmmgr register-app gnuhealth gh "${GNUHEALTH_ADMIN_USER}" "${GNUHEALTH_ADMIN_PWD}" vmmgr register-app gnuhealth gh "${GNUHEALTH_ADMIN_USER}" "${GNUHEALTH_ADMIN_PWD}"
vmmgr register-prop gnuhealth email "${GNUHEALTH_ADMIN_EMAIL}"

View File

@ -1,3 +1,7 @@
#!/bin/sh #!/bin/sh
sed -i "s|\(^from = \).*|\1${EMAIL}|" /srv/gnuhealth/gnuhealth_conf/trytond.conf # Volumes
GNUHEALTH_CONF="${VOLUMES_DIR}/gnuhealth/gnuhealth_conf"
# Replacements
sed -i "s|\(^from = \).*|\1${EMAIL}|" ${GNUHEALTH_CONF}/trytond.conf

View File

@ -36,4 +36,3 @@ spoc-container stop kanboard-postgres
# Register application # Register application
vmmgr register-app kanboard kb "${KANBOARD_ADMIN_USER}" "${KANBOARD_ADMIN_PWD}" vmmgr register-app kanboard kb "${KANBOARD_ADMIN_USER}" "${KANBOARD_ADMIN_PWD}"
vmmgr register-prop kanboard email "admin@example.com"

View File

@ -1,3 +1,7 @@
#!/bin/sh #!/bin/sh
sed -i "s|\(^define('MAIL_FROM', \).*|\1'${EMAIL}');|" /srv/kanboard/kanboard_conf/config.php # Volumes
KANBOARD_CONF="${VOLUMES_DIR}/kanboard/kanboard_conf"
# Replacements
sed -i "s|\(^define('MAIL_FROM', \).*|\1'${EMAIL}');|" ${KANBOARD_CONF}/config.php

View File

@ -48,4 +48,3 @@ spoc-container stop mifosx-mariadb
# Register application # Register application
vmmgr register-app mifosx mifosx "${MIFOSX_ADMIN_USER}" "${MIFOSX_ADMIN_PWD}" vmmgr register-app mifosx mifosx "${MIFOSX_ADMIN_USER}" "${MIFOSX_ADMIN_PWD}"
vmmgr register-prop mifosx email "${MIFOSX_ADMIN_EMAIL}"

View File

@ -1,7 +1,11 @@
#!/bin/sh #!/bin/sh
sed -i "s|\(^\s\+proxyName=\).*|\1\"mifosx.${DOMAIN}\"|" /srv/mifosx/mifosx_conf/server.xml # Volumes
sed -i "s|\(^\s\+proxyPort=\).*|\1\"${PORT}\"|" /srv/mifosx/mifosx_conf/server.xml MIFOSX_CONF="${VOLUMES_DIR}/mifosx/mifosx_conf"
# Replacements
sed -i "s|\(^\s\+proxyName=\).*|\1\"${HOST}.${DOMAIN}\"|" ${MIFOSX_CONF}/server.xml
sed -i "s|\(^\s\+proxyPort=\).*|\1\"${PORT}\"|" ${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 mifosx-mariadb -- mysql -u mysql -e "${QUERY}" mifostenant-default spoc-container exec mifosx-mariadb -- mysql -e "${QUERY}" mifostenant-default

View File

@ -1,5 +1,11 @@
#!/bin/sh #!/bin/sh
HOST="${DOMAIN}" # Volumes
[ "${PORT}" != "443" ] && HOST="${DOMAIN}:${PORT}" MOTECH_CONF="${VOLUMES_DIR}/motech/motech_conf"
sed -i "s|\(^server\.url=\).*|\1https://motech.${HOST}|" /srv/motech/motech_conf/config/motech-settings.properties
# Variables
HOST="${HOST}.${DOMAIN}"
[ "${PORT}" != "443" ] && HOST="${HOST}:${PORT}"
# Replacements
sed -i "s|\(^server\.url=\).*|\1https://${HOST}|" ${MOTECH_CONF}/config/motech-settings.properties

View File

@ -42,4 +42,3 @@ spoc-container stop odoo-postgres
# Register application # Register application
vmmgr register-app odoo odoo "${ODOO_ADMIN_USER}" "${ODOO_ADMIN_PWD}" vmmgr register-app odoo odoo "${ODOO_ADMIN_USER}" "${ODOO_ADMIN_PWD}"
vmmgr register-prop odoo email "admin@example.com"

View File

@ -1,3 +1,7 @@
#!/bin/sh #!/bin/sh
sed -i "s|\(^email_from = \).*|\1${EMAIL}|" /srv/odoo/odoo_conf/odoo.conf # Volumes
ODOO_CONF="${VOLUMES_DIR}/odoo/odoo_conf"
# Replacements
sed -i "s|\(^email_from = \).*|\1${EMAIL}|" ${ODOO_CONF}/odoo.conf

View File

@ -1,5 +1,9 @@
#!/bin/sh #!/bin/sh
sed -i "s|\(^\s\+proxyName=\).*|\1\"odk.${DOMAIN}\"|" /srv/opendatakit/odk_conf/server.xml # Volumes
sed -i "s|\(^\s\+proxyPort=\).*|\1\"${PORT}\"|" /srv/opendatakit/odk_conf/server.xml ODK_CONF="${VOLUMES_DIR}/opendatakit/odk_conf"
sed -i "s|\(^security\.server\.securePort=\).*|\1${PORT}|" /srv/opendatakit/odk_conf/security.properties
# Replacements
sed -i "s|\(^\s\+proxyName=\).*|\1\"${HOST}.${DOMAIN}\"|" ${ODK_CONF}/server.xml
sed -i "s|\(^\s\+proxyPort=\).*|\1\"${PORT}\"|" ${ODK_CONF}/server.xml
sed -i "s|\(^security\.server\.securePort=\).*|\1${PORT}|" ${ODK_CONF}/security.properties

View File

@ -56,4 +56,3 @@ spoc-container stop pandora-rabbitmq
# Register application # Register application
vmmgr register-app pandora pandora "${PANDORA_ADMIN_USER}" "${PANDORA_ADMIN_PWD}" vmmgr register-app pandora pandora "${PANDORA_ADMIN_USER}" "${PANDORA_ADMIN_PWD}"
vmmgr register-prop pandora gmaps-api-key ""

View File

@ -1,7 +1,12 @@
#!/bin/sh #!/bin/sh
HOST="${DOMAIN}" # Volumes
[ "${PORT}" != "443" ] && HOST="${DOMAIN}:${PORT}" PANDORA_CONF="${VOLUMES_DIR}/pandora/pandora_conf"
sed -i "s|\(^\s\+\"url\": \).*|\1\"pandora.${HOST}\"|" /srv/pandora/pandora_conf/config.jsonc
sed -i "s|\(^GOOGLE_API_KEY = \).*|\1'${GMAPS_API_KEY}'|" /srv/pandora/pandora_conf/local_settings.py # Variables
HOST="${HOST}.${DOMAIN}"
[ "${PORT}" != "443" ] && HOST="${HOST}:${PORT}"
# Replacements
sed -i "s|\(^\s\+\"url\": \).*|\1\"${HOST}\"|" ${PANDORA_CONF}/config.jsonc
sed -i "s|\(^GOOGLE_API_KEY = \).*|\1'${GMAPS_API_KEY}'|" ${PANDORA_CONF}/local_settings.py

View File

@ -47,5 +47,3 @@ spoc-container stop sahana-demo-postgres
# Register application # Register application
vmmgr register-app sahana-demo sahana-demo "${SAHANADEMO_ADMIN_USER}" "${SAHANADEMO_ADMIN_PWD}" vmmgr register-app sahana-demo sahana-demo "${SAHANADEMO_ADMIN_USER}" "${SAHANADEMO_ADMIN_PWD}"
vmmgr register-prop sahana-demo email "${SAHANADEMO_ADMIN_USER}"
vmmgr register-prop sahana-demo gmaps-api-key ""

View File

@ -1,9 +1,14 @@
#!/bin/sh #!/bin/sh
HOST="${DOMAIN}" # Volumes
[ "${PORT}" != "443" ] && HOST="${PORT}:${DOMAIN}" SAHANA_CONF="${VOLUMES_DIR}/sahana-demo/sahana_conf"
sed -i "s|\(^settings\.base\.public_url = \).*|\1\"https://sahana-demo.${HOST}\"|" /srv/sahana-demo/sahana_conf/000_config.py
sed -i "s|\(^settings\.mail\.sender = \).*|\1\"${EMAIL}\"|" /srv/sahana-demo/sahana_conf/000_config.py # Variables
sed -i "s|\(^settings\.mail\.approver = \).*|\1\"${EMAIL}\"|" /srv/sahana-demo/sahana_conf/000_config.py HOST="${HOST}.${DOMAIN}"
sed -i "s|\(^settings\.gis\.api_google = \).*|\1\"${GMAPS_API_KEY}\"|" /srv/sahana-demo/sahana_conf/000_config.py [ "${PORT}" != "443" ] && HOST="${HOST}:${PORT}"
# Replacements
sed -i "s|\(^settings\.base\.public_url = \).*|\1\"https://${HOST}\"|" ${SAHANA_CONF}/000_config.py
sed -i "s|\(^settings\.mail\.sender = \).*|\1\"${EMAIL}\"|" ${SAHANA_CONF}/000_config.py
sed -i "s|\(^settings\.mail\.approver = \).*|\1\"${EMAIL}\"|" ${SAHANA_CONF}/000_config.py
sed -i "s|\(^settings\.gis\.api_google = \).*|\1\"${GMAPS_API_KEY}\"|" ${SAHANA_CONF}/000_config.py

View File

@ -52,5 +52,3 @@ spoc-container stop sahana-postgres
# Register application # Register application
vmmgr register-app sahana sahana "${SAHANA_ADMIN_USER}" "${SAHANA_ADMIN_PWD}" vmmgr register-app sahana sahana "${SAHANA_ADMIN_USER}" "${SAHANA_ADMIN_PWD}"
vmmgr register-prop sahana email "${SAHANA_ADMIN_USER}"
vmmgr register-prop sahana gmaps-api-key ""

View File

@ -1,9 +1,14 @@
#!/bin/sh #!/bin/sh
HOST="${DOMAIN}" # Volumes
[ "${PORT}" != "443" ] && HOST="${PORT}:${DOMAIN}" SAHANA_CONF="${VOLUMES_DIR}/sahana/sahana_conf"
sed -i "s|\(^settings\.base\.public_url = \).*|\1\"https://sahana.${HOST}\"|" /srv/sahana/sahana_conf/000_config.py
sed -i "s|\(^settings\.mail\.sender = \).*|\1\"${EMAIL}\"|" /srv/sahana/sahana_conf/000_config.py # Variables
sed -i "s|\(^settings\.mail\.approver = \).*|\1\"${EMAIL}\"|" /srv/sahana/sahana_conf/000_config.py HOST="${HOST}.${DOMAIN}"
sed -i "s|\(^settings\.gis\.api_google = \).*|\1\"${GMAPS_API_KEY}\"|" /srv/sahana/sahana_conf/000_config.py [ "${PORT}" != "443" ] && HOST="${HOST}:${PORT}"
# Replacements
sed -i "s|\(^settings\.base\.public_url = \).*|\1\"https://${HOST}\"|" ${SAHANA_CONF}/000_config.py
sed -i "s|\(^settings\.mail\.sender = \).*|\1\"${EMAIL}\"|" ${SAHANA_CONF}/000_config.py
sed -i "s|\(^settings\.mail\.approver = \).*|\1\"${EMAIL}\"|" ${SAHANA_CONF}/000_config.py
sed -i "s|\(^settings\.gis\.api_google = \).*|\1\"${GMAPS_API_KEY}\"|" ${SAHANA_CONF}/000_config.py

View File

@ -50,5 +50,3 @@ spoc-container stop sambro-postgres
# Register application # Register application
vmmgr register-app sambro sambro "${SAMBRO_ADMIN_USER}" "${SAMBRO_ADMIN_PWD}" vmmgr register-app sambro sambro "${SAMBRO_ADMIN_USER}" "${SAMBRO_ADMIN_PWD}"
vmmgr register-prop sambro email "${SAMBRO_ADMIN_USER}"
vmmgr register-prop sambro gmaps-api-key ""

View File

@ -1,9 +1,14 @@
#!/bin/sh #!/bin/sh
HOST="${DOMAIN}" # Volumes
[ "${PORT}" != "443" ] && HOST="${PORT}:${DOMAIN}" SAHANA_CONF="${VOLUMES_DIR}/sambro/sahana_conf"
sed -i "s|\(^settings\.base\.public_url = \).*|\1\"https://sambro.${HOST}\"|" /srv/sambro/sahana_conf/000_config.py
sed -i "s|\(^settings\.mail\.sender = \).*|\1\"${EMAIL}\"|" /srv/sambro/sahana_conf/000_config.py # Variables
sed -i "s|\(^settings\.mail\.approver = \).*|\1\"${EMAIL}\"|" /srv/sambro/sahana_conf/000_config.py HOST="${HOST}.${DOMAIN}"
sed -i "s|\(^settings\.gis\.api_google = \).*|\1\"${GMAPS_API_KEY}\"|" /srv/sambro/sahana_conf/000_config.py [ "${PORT}" != "443" ] && HOST="${HOST}:${PORT}"
# Replacements
sed -i "s|\(^settings\.base\.public_url = \).*|\1\"https://${HOST}\"|" ${SAHANA_CONF}/000_config.py
sed -i "s|\(^settings\.mail\.sender = \).*|\1\"${EMAIL}\"|" ${SAHANA_CONF}/000_config.py
sed -i "s|\(^settings\.mail\.approver = \).*|\1\"${EMAIL}\"|" ${SAHANA_CONF}/000_config.py
sed -i "s|\(^settings\.gis\.api_google = \).*|\1\"${GMAPS_API_KEY}\"|" ${SAHANA_CONF}/000_config.py

View File

@ -38,4 +38,3 @@ spoc-container stop seeddms-postgres
# Register application # Register application
vmmgr register-app seeddms dms "${SEEDDMS_ADMIN_USER}" "${SEEDDMS_ADMIN_PWD}" vmmgr register-app seeddms dms "${SEEDDMS_ADMIN_USER}" "${SEEDDMS_ADMIN_PWD}"
vmmgr register-prop seeddms email "${SEEDDMS_ADMIN_EMAIL}"

View File

@ -1,3 +1,7 @@
#!/bin/sh #!/bin/sh
sed -i "s|\(^\s\+<smtp smtpServer=\"host\" smtpPort=\"25\" smtpSendFrom=\).*|\1\"${EMAIL}\" smtpUser=\"\" smtpPassword=\"\"/>|" /srv/seeddms/seeddms_conf/settings.xml # Volumes
SEEDDMS_CONF="${VOLUMES_DIR}/seeddms/seeddms_conf"
# Replacements
sed -i "s|\(^\s\+<smtp smtpServer=\"host\" smtpPort=\"25\" smtpSendFrom=\).*|\1\"${EMAIL}\" smtpUser=\"\" smtpPassword=\"\"/>|" ${SEEDDMS_CONF}/settings.xml

View File

@ -50,5 +50,3 @@ spoc-container stop sigmah-postgres
# Register application # Register application
vmmgr register-app sigmah sigmah "${SIGMAH_ADMIN_EMAIL}" "${SIGMAH_ADMIN_PWD}" vmmgr register-app sigmah sigmah "${SIGMAH_ADMIN_EMAIL}" "${SIGMAH_ADMIN_PWD}"
vmmgr register-prop sigmah email "${SIGMAH_ADMIN_EMAIL}"
vmmgr register-prop sigmah gmaps-api-key ""

View File

@ -1,5 +1,9 @@
#!/bin/sh #!/bin/sh
sed -i "s|\(^mail\.from\.address=\).*|\1${EMAIL}|" /srv/sigmah/sigmah_conf/sigmah.properties # Volumes
sed -i "s|\(^mail\.support\.to=\).*|\1${EMAIL}|" /srv/sigmah/sigmah_conf/sigmah.properties SIGMAH_CONF="${VOLUMES_DIR}/sigmah/sigmah_conf"
sed -i "s|\(^maps\.key=\).*|\1${GMAPS_API_KEY}|" /srv/sigmah/sigmah_conf/sigmah.properties
# Replacements
sed -i "s|\(^mail\.from\.address=\).*|\1${EMAIL}|" ${SIGMAH_CONF}/sigmah.properties
sed -i "s|\(^mail\.support\.to=\).*|\1${EMAIL}|" ${SIGMAH_CONF}/sigmah.properties
sed -i "s|\(^maps\.key=\).*|\1${GMAPS_API_KEY}|" ${SIGMAH_CONF}/sigmah.properties

View File

@ -50,5 +50,3 @@ spoc-container stop ushahidi-mariadb
# Register application # Register application
vmmgr register-app ushahidi ush "${USHAHIDI_ADMIN_USER}" "${USHAHIDI_ADMIN_PWD}" vmmgr register-app ushahidi ush "${USHAHIDI_ADMIN_USER}" "${USHAHIDI_ADMIN_PWD}"
vmmgr register-prop ushahidi email "${USHAHIDI_ADMIN_USER}"
vmmgr register-prop ushahidi gmaps-api-key ""

View File

@ -1,15 +1,21 @@
#!/bin/sh #!/bin/sh
HOST="${DOMAIN}" # Volumes
[ "${PORT}" != "443" ] && HOST="${DOMAIN}:${PORT}" USHAHIDI_CONF="${VOLUMES_DIR}/ushahidi/ushahidi_conf"
sed -i "s|\(^\s\+\"backend_url\": \).*|\1\"https://ush.${HOST}/platform\",|" /srv/ushahidi/ushahidi_conf/config.json
API_URL="\"https:\\\/\\\/ush.${HOST}\\\/platform\\\/api\\\/v3\\\/config\\\/data-provider\"" # Variables
HOST="${HOST}.${DOMAIN}"
[ "${PORT}" != "443" ] && HOST="${HOST}:${PORT}"
# Replacements
sed -i "s|\(^\s\+\"backend_url\": \).*|\1\"https://${HOST}/platform\",|" ${USHAHIDI_CONF}/config.json
API_URL="\"https:\\\/\\\/${HOST}\\\/platform\\\/api\\\/v3\\\/config\\\/data-provider\""
QUERY="UPDATE \`config\` SET \`config_value\` = '${API_URL}' WHERE \`group_name\` LIKE 'data-provider' AND \`config_key\` LIKE 'url'" QUERY="UPDATE \`config\` SET \`config_value\` = '${API_URL}' WHERE \`group_name\` LIKE 'data-provider' AND \`config_key\` LIKE 'url'"
lxc-attach ushahidi-mariadb -- mysql -u mysql -e "${QUERY}" ushahidi spoc-container exec ushahidi-mariadb -- mysql -e "${QUERY}" ushahidi
JSON="{\"incoming_type\":\"IMAP\",\"incoming_server\":\"localhost\",\"incoming_port\":143,\"incoming_security\":\"None\",\"incoming_username\":\"${EMAIL}\",\"incoming_password\":\"password\",\"outgoing_type\":\"SMTP\",\"outgoing_server\":\"host\",\"outgoing_port\":25,\"outgoing_security\":\"None\",\"outgoing_username\":\"${EMAIL}\",\"outgoing_password\":\"password\",\"from\":\"${EMAIL}\",\"from_name\":\"Ushahidi\"}" JSON="{\"incoming_type\":\"IMAP\",\"incoming_server\":\"localhost\",\"incoming_port\":143,\"incoming_security\":\"None\",\"incoming_username\":\"${EMAIL}\",\"incoming_password\":\"password\",\"outgoing_type\":\"SMTP\",\"outgoing_server\":\"host\",\"outgoing_port\":25,\"outgoing_security\":\"None\",\"outgoing_username\":\"${EMAIL}\",\"outgoing_password\":\"password\",\"from\":\"${EMAIL}\",\"from_name\":\"Ushahidi\"}"
QUERY="UPDATE \`config\` SET \`config_value\` = '${JSON}' WHERE \`group_name\` LIKE 'data-provider' AND \`config_key\` LIKE 'email'" QUERY="UPDATE \`config\` SET \`config_value\` = '${JSON}' WHERE \`group_name\` LIKE 'data-provider' AND \`config_key\` LIKE 'email'"
lxc-attach ushahidi-mariadb -- mysql -u mysql -e "${QUERY}" ushahidi spoc-container exec ushahidi-mariadb -- mysql -e "${QUERY}" ushahidi
QUERY="UPDATE \`config\` SET \`config_value\` = '\"${EMAIL}\"' WHERE \`group_name\` LIKE 'site' AND \`config_key\` LIKE 'email'" QUERY="UPDATE \`config\` SET \`config_value\` = '\"${EMAIL}\"' WHERE \`group_name\` LIKE 'site' AND \`config_key\` LIKE 'email'"
lxc-attach ushahidi-mariadb -- mysql -u mysql -e "${QUERY}" ushahidi spoc-container exec ushahidi-mariadb -- mysql -e "${QUERY}" ushahidi
sed -i "s|\(^\s\+\"google_analytics_id\": \).*|\1\"${GMAPS_API_KEY}\"|" /srv/ushahidi/ushahidi_conf/config.json sed -i "s|\(^\s\+\"google_analytics_id\": \).*|\1\"${GMAPS_API_KEY}\"|" ${USHAHIDI_CONF}/config.json