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