Created
January 27, 2012 00:17
-
-
Save torrancew/1686077 to your computer and use it in GitHub Desktop.
D* Resque Worker Runit Script
This file contains 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 characters
#! /bin/sh | |
exec 2>&1 | |
USER=diaspora | |
ENV_DIR=/etc/diaspora/env | |
DEPLOY_PATH=/usr/local/share/diaspora | |
APP_ROOT=$DEPLOY_PATH/current | |
BUNDLE_PATH=$DEPLOY_PATH/shared/bundle | |
for env_var in PATH GEM_HOME GEM_PATH; do | |
export $env_var="$(cat $ENV_DIR/$env_var)" | |
done | |
sv check redis | |
cd $APP_ROOT | |
exec chpst -u $USER -e $ENV_DIR bundle exec rake resque:work |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this is going to start the resque worker if it's stopped?