Created
October 20, 2012 01:38
-
-
Save evopix/3921634 to your computer and use it in GitHub Desktop.
Revisions
-
evopix revised this gist
Oct 26, 2012 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ set -e ENV="development" ROOT="/vagrant" QUEUES="*" COUNT=2 @@ -28,7 +28,7 @@ start() { program="$MINION" options="$TASK" options="$options --resque=$QUEUES --count=$COUNT --verbose=$VERBOSE --env=$ENV" cd $ROOT echo "Starting $NAME workers ..." @@ -42,7 +42,7 @@ stop() { program="$MINION" options="$TASK" options="$options --shutdown --env=$ENV" cd $ROOT echo "Stopping $NAME workers ..." -
evopix created this gist
Oct 20, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,71 @@ #!/bin/sh -e ### BEGIN INIT INFO # Provides: php-resque # Required-Start: $local_fs $remote_fs # Required-Stop: $local_fs $remote_fs # Should-Start: $local_fs # Should-Stop: $local_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: resque - a Redis-backed PHP library for creating background jobs # Description: resque - a Redis-backed PHP library for creating background jobs, placing those jobs on multiple queues, and processing them later. ### END INIT INFO set -e NAME="php-resque" ROOT="/vagrant" QUEUES="*" COUNT=2 VERBOSE=1 MINION="$ROOT/minion" TASK="resque" start() { local program local options program="$MINION" options="$TASK" options="$options --resque=$QUEUES --count=$COUNT --verbose=$VERBOSE" cd $ROOT echo "Starting $NAME workers ..." $program $options >> /dev/null } stop() { local program local options program="$MINION" options="$TASK" options="$options --shutdown" cd $ROOT echo "Stopping $NAME workers ..." $program $options } case "$1" in start) start ;; stop) stop ;; restart) stop sleep 1 start ;; *) echo "Usage: $0 {start|stop|restart}" >&2 exit 1 ;; esac