2013-03-09 16:18:03 -05:00
|
|
|
# /etc/init/puma-manager.conf - manage a set of Pumas
|
|
|
|
|
|
|
|
# This example config should work with Ubuntu 12.04+. It
|
|
|
|
# allows you to manage multiple Puma instances with
|
|
|
|
# Upstart, Ubuntu's native service management tool.
|
|
|
|
#
|
|
|
|
# See puma.conf for how to manage a single Puma instance.
|
|
|
|
#
|
2013-06-05 13:28:32 -04:00
|
|
|
# Use "stop puma-manager" to stop all Puma instances.
|
|
|
|
# Use "start puma-manager" to start all instances.
|
|
|
|
# Use "restart puma-manager" to restart all instances.
|
2013-03-09 16:18:03 -05:00
|
|
|
# Crazy, right?
|
|
|
|
#
|
|
|
|
|
|
|
|
description "Manages the set of puma processes"
|
|
|
|
|
|
|
|
# This starts upon bootup and stops on shutdown
|
|
|
|
start on runlevel [2345]
|
|
|
|
stop on runlevel [06]
|
|
|
|
|
|
|
|
# Set this to the number of Puma processes you want
|
|
|
|
# to run on this machine
|
2013-05-27 10:34:05 -04:00
|
|
|
env PUMA_CONF="/etc/puma.conf"
|
2013-03-09 16:18:03 -05:00
|
|
|
|
|
|
|
pre-start script
|
|
|
|
for i in `cat $PUMA_CONF`; do
|
|
|
|
app=`echo $i | cut -d , -f 1`
|
2013-06-05 13:28:32 -04:00
|
|
|
logger -t "puma-manager" "Starting $app"
|
2013-03-09 16:18:03 -05:00
|
|
|
start puma app=$app
|
|
|
|
done
|
|
|
|
end script
|