Sha256: e429e91bfccc5cf507bec2399ee9c7c76d06b9490b9886b81c1538a1daffc092

Contents?: true

Size: 1.26 KB

Versions: 37

Compression:

Stored size: 1.26 KB

Contents

#!/bin/bash

# <%= mongos_name %> - Startup script for mongos

# chkconfig: 35 85 15
# description: <%= Mongos_name %>.
# processname: mongos
# pidfile: /tmp/<%= mongos_name %>.pid

. /etc/rc.d/init.d/functions

# things from mongos.conf get there by mongod reading it

OPTIONS=" --configdb <%= mongos_config_db %> --logpath <%= mongos_log_path %> --pidfilepath /tmp/<%= mongos_name %>.pid"

mongos=${MONGOS-/usr/bin/mongos}

MONGO_USER=mongod
MONGO_GROUP=mongod

start()
{
  echo -n $"Starting <%= mongos_name %>: "
  daemon --user "$MONGO_USER" $mongos $OPTIONS
  RETVAL=$?
  echo
  [ $RETVAL -eq 0 ] && touch /var/lock/subsys/<%= mongos_name %>
}

stop()
{
  echo -n $"Stopping <%= mongos_name %>: "
  killproc -p /tmp/<%= mongos_name %>.pid -t30 -TERM /usr/bin/mongos
  RETVAL=$?
  echo
  [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/<%= mongos_name %>
}

restart () {
        stop
        start
}

ulimit -n 12000
RETVAL=0

case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  restart|reload|force-reload)
    restart
    ;;
  condrestart)
    [ -f /var/lock/subsys/<%= mongos_name %> ] && restart || :
    ;;
  status)
    status $mongos
    RETVAL=$?
    ;;
  *)
    echo "Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"
    RETVAL=1
esac

exit $RETVAL

Version data entries

37 entries across 37 versions & 2 rubygems

Version Path
uhl-cap-recipes-0.2.11 lib/cap_recipes/tasks/templates/mongos.init.erb
uhl-cap-recipes-0.2.10 lib/cap_recipes/tasks/templates/mongos.init.erb
uhl-cap-recipes-0.1.10 lib/cap_recipes/tasks/templates/mongos.init.erb
uhl-cap-recipes-0.1.9 lib/cap_recipes/tasks/templates/mongos.init.erb
uhl-cap-recipes-0.1.8 lib/cap_recipes/tasks/templates/mongos.init.erb
uhl-cap-recipes-0.1.7 lib/cap_recipes/tasks/templates/mongos.init.erb
uhl-cap-recipes-0.1.6 lib/cap_recipes/tasks/templates/mongos.init.erb
uhl-cap-recipes-0.1.5 lib/cap_recipes/tasks/templates/mongos.init.erb
uhl-cap-recipes-0.1.4 lib/cap_recipes/tasks/templates/mongos.init.erb
uhl-cap-recipes-0.1.3 lib/cap_recipes/tasks/templates/mongos.init.erb
uhl-cap-recipes-0.1.2 lib/cap_recipes/tasks/templates/mongos.init.erb
uhl-cap-recipes-0.1.1 lib/cap_recipes/tasks/templates/mongos.init.erb
uhl-cap-recipes-0.1.0 lib/cap_recipes/tasks/templates/mongos.init.erb
crazycode-cap-recipes-0.5.3 lib/cap_recipes/tasks/templates/mongos.init.erb
crazycode-cap-recipes-0.5.2 lib/cap_recipes/tasks/templates/mongos.init.erb
crazycode-cap-recipes-0.5.1 lib/cap_recipes/tasks/templates/mongos.init.erb
crazycode-cap-recipes-0.5.0 lib/cap_recipes/tasks/templates/mongos.init.erb
crazycode-cap-recipes-0.4.14 lib/cap_recipes/tasks/templates/mongos.init.erb
crazycode-cap-recipes-0.4.13 lib/cap_recipes/tasks/templates/mongos.init.erb
crazycode-cap-recipes-0.4.12 lib/cap_recipes/tasks/templates/mongos.init.erb