Bug 950883

Terminate echo statement correctly and set up env vars for MongoDB.