2018-09-20 14:03:23 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-04-10 13:03:34 +02:00
|
|
|
# Volumes
|
|
|
|
MIFOSX_CONF="${VOLUMES_DIR}/mifosx/mifosx_conf"
|
|
|
|
|
2020-10-22 22:57:45 +02:00
|
|
|
# Start MariaDB container if needed
|
|
|
|
if [ "$(spoc-container status mifosx-mariadb)" != "RUNNING" ]; then
|
|
|
|
STOP_MARIADB=1
|
|
|
|
spoc-container start mifosx-mariadb
|
|
|
|
fi
|
|
|
|
|
2020-04-10 13:03:34 +02:00
|
|
|
# Replacements
|
2020-04-10 17:57:42 +02:00
|
|
|
sed -i "s|\(^\s\+proxyName=\).*|\1\"${HOST}\"|" ${MIFOSX_CONF}/server.xml
|
2020-04-10 13:03:34 +02:00
|
|
|
sed -i "s|\(^\s\+proxyPort=\).*|\1\"${PORT}\"|" ${MIFOSX_CONF}/server.xml
|
2018-09-20 14:03:23 +02:00
|
|
|
|
2018-09-20 15:45:00 +02:00
|
|
|
QUERY="UPDATE \`c_external_service_properties\` SET \`value\` = '${EMAIL}' WHERE \`external_service_id\` = 2 and \`name\` LIKE 'username'"
|
2020-04-10 13:03:34 +02:00
|
|
|
spoc-container exec mifosx-mariadb -- mysql -e "${QUERY}" mifostenant-default
|
2020-10-22 22:57:45 +02:00
|
|
|
|
|
|
|
# Stop MariaDB container if needed
|
|
|
|
if [ -n "${STOP_MARIADB}" ]; then
|
|
|
|
echo spoc-container stop mifosx-mariadb
|
|
|
|
fi
|