From 3955c749cd32f135a5740bc88af8e596eb213024 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Sat, 3 Feb 2018 12:59:09 +0100 Subject: [PATCH] Integrate Mifos X with postfix --- mifosx.sh | 1 + mifosx/adminpwd.sql | 7 ++++++- mifosx/etc/init.d/mifosx | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/mifosx.sh b/mifosx.sh index 79b344b..ce3d169 100755 --- a/mifosx.sh +++ b/mifosx.sh @@ -4,6 +4,7 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/mifosx # Check prerequisites docker image ls | grep -q mariadb || $(realpath $(dirname "${0}"))/mariadb.sh +docker image ls | grep -q postfix || $(realpath $(dirname "${0}"))/postfix.sh docker image ls | grep -q tomcat || $(realpath $(dirname "${0}"))/tomcat.sh # Build Docker container diff --git a/mifosx/adminpwd.sql b/mifosx/adminpwd.sql index a439999..bf19c45 100644 --- a/mifosx/adminpwd.sql +++ b/mifosx/adminpwd.sql @@ -1 +1,6 @@ -UPDATE m_appuser SET username = "${MIFOSX_ADMIN_USER}", password = "${MIFOSX_ADMIN_HASH}", email = "${MIFOSX_ADMIN_EMAIL}" WHERE id = 1; +UPDATE `m_appuser` SET `username` = "${MIFOSX_ADMIN_USER}", `password` = "${MIFOSX_ADMIN_HASH}", `email` = "${MIFOSX_ADMIN_EMAIL}" WHERE `id` = 1; + +UPDATE `c_external_service_properties` SET `value` = "mifosx@spotter.ngo" WHERE `external_service_id` = 2 and `name` LIKE "username"; +UPDATE `c_external_service_properties` SET `value` = "" WHERE `external_service_id` = 2 and `name` LIKE "password"; +UPDATE `c_external_service_properties` SET `value` = "postfix" WHERE `external_service_id` = 2 and `name` LIKE "host"; +UPDATE `c_external_service_properties` SET `value` = "false" WHERE `external_service_id` = 2 and `name` LIKE "useTLS"; diff --git a/mifosx/etc/init.d/mifosx b/mifosx/etc/init.d/mifosx index 3f6bb63..7ab17ad 100755 --- a/mifosx/etc/init.d/mifosx +++ b/mifosx/etc/init.d/mifosx @@ -4,7 +4,7 @@ description="Mifos X docker container" depend() { need docker net - use dns logger netmount + use dns logger netmount postfix after mariadb } @@ -13,6 +13,7 @@ start() { --name mifosx \ -h mifosx \ --link mariadb \ + --link postfix \ -p 127.0.0.1:8012:8012 \ -v /srv/mifosx/conf/context.xml:/srv/tomcat/webapps/fineract-provider/META-INF/context.xml \ mifosx