diff --git a/mattermost/hooks/postgres_database-relation-joined b/mattermost/hooks/postgres_database-relation-joined index a751df5..5122349 100755 --- a/mattermost/hooks/postgres_database-relation-joined +++ b/mattermost/hooks/postgres_database-relation-joined @@ -18,6 +18,9 @@ services: MM_USERNAME: $USER " +sed -ri 's/(^\s+"DataSource": "postgres:[^:]+:)([^@]+)@/\1'"$PASSWORD"'@/' \ + "$SERVICE_CONFIGSTORE/mattermost/config/config.json" || exit 1 + [ "$control" == "$(relation-get control 2>/dev/null)" ] && exit 0