mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Support for /var/run for pids
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@515 19e92222-5c0b-0410-8929-a290d50e31e9
This commit is contained in:
parent
a78fa59a9e
commit
c22b3db405
1 changed files with 14 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2006 Bradley Taylor, bradley@railsmachine.com
|
||||
# Copyright (c) 2007 Bradley Taylor, bradley@railsmachine.com
|
||||
#
|
||||
# mongrel_cluster Startup script for Mongrel clusters.
|
||||
#
|
||||
|
@ -10,8 +10,10 @@
|
|||
#
|
||||
|
||||
CONF_DIR=/etc/mongrel_cluster
|
||||
RETVAL=0
|
||||
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
|
||||
|
@ -21,6 +23,10 @@ which mongrel_cluster_ctl >/dev/null || 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=$?
|
||||
;;
|
||||
|
@ -31,11 +37,15 @@ case "$1" in
|
|||
restart)
|
||||
mongrel_cluster_ctl restart -c $CONF_DIR
|
||||
RETVAL=$?
|
||||
;;
|
||||
status)
|
||||
mongrel_cluster_ctl restart -c $CONF_DIR
|
||||
RETVAL=$?
|
||||
;;
|
||||
*)
|
||||
echo "Usage: mongrel_cluster {start|stop|restart}"
|
||||
echo "Usage: mongrel_cluster {start|stop|restart|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
exit $RETVAL
|
||||
|
|
Loading…
Add table
Reference in a new issue