Skip to content

Instantly share code, notes, and snippets.

@torrancew
Created January 27, 2012 00:17
Show Gist options
  • Save torrancew/1686077 to your computer and use it in GitHub Desktop.
Save torrancew/1686077 to your computer and use it in GitHub Desktop.
D* Resque Worker Runit Script
#! /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
@chukitow
Copy link

this is going to start the resque worker if it's stopped?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment