Sha256: 4ae6f95ad593676dd7d7ffbe9763aa2969c9ab1c0a99ad8af7be1ef677a7e299

Contents?: true

Size: 1.16 KB

Versions: 147

Compression:

Stored size: 1.16 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.
#              

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local:/usr/local/sbin:/usr/local/bin
CONF_DIR=/etc/mongrel_cluster
PID_DIR=/var/run/mongrel_cluster
# USER=mongrel

EVENT=1

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 --clean -c $CONF_DIR
      RETVAL=$?
  ;;
    stop)
      mongrel_cluster_ctl stop -c $CONF_DIR
      RETVAL=$?
  ;;
    restart)
      mongrel_cluster_ctl restart --clean -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

147 entries across 147 versions & 7 rubygems

Version Path
le1t0-deprec-2.1.6.021 lib/deprec/templates/mongrel/mongrel_cluster-init-script
le1t0-deprec-2.1.6.020 lib/deprec/templates/mongrel/mongrel_cluster-init-script
le1t0-deprec-2.1.6.019 lib/deprec/templates/mongrel/mongrel_cluster-init-script
le1t0-deprec-2.1.6.018 lib/deprec/templates/mongrel/mongrel_cluster-init-script
le1t0-deprec-2.1.6.017 lib/deprec/templates/mongrel/mongrel_cluster-init-script
le1t0-deprec-2.1.6.016 lib/deprec/templates/mongrel/mongrel_cluster-init-script
le1t0-deprec-2.1.6.015 lib/deprec/templates/mongrel/mongrel_cluster-init-script
le1t0-deprec-2.1.6.014 lib/deprec/templates/mongrel/mongrel_cluster-init-script
le1t0-deprec-2.1.6.013 lib/deprec/templates/mongrel/mongrel_cluster-init-script
le1t0-deprec-2.1.6.012 lib/deprec/templates/mongrel/mongrel_cluster-init-script
le1t0-deprec-2.1.6.011 lib/deprec/templates/mongrel/mongrel_cluster-init-script
le1t0-deprec-2.1.6.010 lib/deprec/templates/mongrel/mongrel_cluster-init-script
le1t0-deprec-2.1.6.009 lib/deprec/templates/mongrel/mongrel_cluster-init-script
le1t0-deprec-2.1.6.008 lib/deprec/templates/mongrel/mongrel_cluster-init-script
le1t0-deprec-2.1.6.007 lib/deprec/templates/mongrel/mongrel_cluster-init-script
le1t0-deprec-2.1.6.006 lib/deprec/templates/mongrel/mongrel_cluster-init-script
le1t0-deprec-2.1.6.005 lib/deprec/templates/mongrel/mongrel_cluster-init-script
le1t0-deprec-2.1.6.004 lib/deprec/templates/mongrel/mongrel_cluster-init-script
le1t0-deprec-2.1.6.003 lib/deprec/templates/mongrel/mongrel_cluster-init-script
le1t0-deprec-2.1.6.002 lib/deprec/templates/mongrel/mongrel_cluster-init-script