Sha256: b159ab5e6d34f237b77f0f3695741427963e9a7e47026e78499de08917776e4b

Contents?: true

Size: 1.06 KB

Versions: 4

Compression:

Stored size: 1.06 KB

Contents

#!/bin/bash
#
# Copyright (c) 2007 Bradley Taylor, bradley@railsmachine.com
#
# mongrel_cluster       Startup script for Mongrel clusters.
#
# chkconfig: - 85 15
# description: mongrel_cluster manages multiple Mongrel processes for use \
#              behind a load balancer.
#              

CONF_DIR=/etc/mongrel_cluster
PID_DIR=/var/run/mongrel_cluster
USER=mongrel

RETVAL=0

# Gracefully exit if the controller is missing.
which mongrel_cluster_ctl >/dev/null || exit 0

# Go no further if config directory is missing.
[ -d "$CONF_DIR" ] || exit 0

case "$1" in
    start)
      # Create pid directory
      mkdir -p $PID_DIR
      chown $USER:$USER $PID_DIR

      mongrel_cluster_ctl start -c $CONF_DIR
      RETVAL=$?
  ;;
    stop)
      mongrel_cluster_ctl stop -c $CONF_DIR
      RETVAL=$?
  ;;
    restart)
      mongrel_cluster_ctl restart -c $CONF_DIR
      RETVAL=$?
  ;;
    status)
      mongrel_cluster_ctl status -c $CONF_DIR
      RETVAL=$?
  ;;
    *)
      echo "Usage: mongrel_cluster {start|stop|restart|status}"
      exit 1
  ;;
esac      

exit $RETVAL

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mongrel_cluster-1.0.5 resources/mongrel_cluster
mongrel_cluster-1.0.4 resources/mongrel_cluster
mongrel_cluster-1.0.3 resources/mongrel_cluster
mongrel_cluster-1.0.2 resources/mongrel_cluster