#!/bin/bash for h in $MONGODB_CONFIG_HOSTS ; do echo "*" echo "* Stopping MongoDB Config Server on $h:27019" echo "*" ssh $h "mongo --host localhost --port 27019 -eval \"db.getSiblingDB('admin').shutdownServer()\"" echo "*****" echo "" done