Skip to content

Instantly share code, notes, and snippets.

@technoweenie
Created January 15, 2010 15:36
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save technoweenie/4e9ccc9f9b27d91d323b to your computer and use it in GitHub Desktop.
Save technoweenie/4e9ccc9f9b27d91d323b to your computer and use it in GitHub Desktop.
# i'm no runit expert, i just ripped off someone's runit config and got this to work:
# /var/service/tender-dj-1/run
# -rwxr-xr-x
#!/bin/sh
set -e
PATH=/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2
cd /data/tender/current
exec 2>&1
exec chpst -u entp:entp -e /var/service/tender-dj-1/env rake jobs:work
# /var/service/tender-dj-1/env is a dir with files containing the env contents
# put whatever you want there
$ cat env/RAILS_ENV
production
$ cat env/MAX_PRIORITY
2
# /var/service/tender-dj-1/log/run
# -rwxr-xr-x
#!/bin/sh
set -e
exec svlogd ./main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment