#!/bin/bash # Ubuntu Linux init script for Rails application in cluster # set these variables to your production environment CONF=/home/captain/apps/Intranet/shared/system/intranet_cluster.yml APP_NAME="Intranet" # more variables - you shouldn't need to change this MONGREL="/usr/bin/mongrel_rails" # load library functions . /lib/lsb/init-functions case "$1" in start) log_begin_msg "Starting Mongrel cluster: $APP_NAME" $MONGREL cluster::start -C $CONF log_end_msg 0 ;; stop) log_begin_msg "Stopping Mongrel cluster: $APP_NAME" $MONGREL cluster::stop -C $CONF log_end_msg 0 ;; restart) log_begin_msg "Restarting Mongrel cluster: $APP_NAME" $MONGREL cluster::restart -C $CONF log_end_msg 0 ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac exit 0