Skip to content

Instantly share code, notes, and snippets.

@yalab
Created June 16, 2012 03:55
Show Gist options
  • Save yalab/2939840 to your computer and use it in GitHub Desktop.
Save yalab/2939840 to your computer and use it in GitHub Desktop.
Upstart script mongodb sharding router
# Ubuntu upstart file at /etc/init/mongos.conf
start on runlevel [2345]
stop on runlevel [06]
script
ENABLE_MONGODB="yes"
PIDFILE=/var/run/mongos.pid
if [ "x$ENABLE_MONGODB" = "xyes" ]; then exec start-stop-daemon --start --quiet --chuid mongodb -m --pidfile $PIDFILE --exec /usr/bin/mongos -- --config /etc/mongos.conf; fi
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment