#!/bin/bash for h in $MONGODB_CONFIG_HOSTS ; do echo "* Starting MongoDB Config Server on $h:$MONGODB_CONFIG_PORT" ssh $h "mongod --configsvr --dbpath \"$MONGODB_DBDIR/config-metadata\" --port $MONGODB_CONFIG_PORT > mongodb-output-$h-config.log &" done