Last active
December 18, 2015 04:48
-
-
Save poppen/5727699 to your computer and use it in GitHub Desktop.
upstart script for tDiary server
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
description "tdiary-server" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn # respawn the service if it dies | |
respawn limit 5 10 # stop respawning if it fails 5 times in 10 seconds | |
env PATH=/usr/local/rbenv/shims:/usr/local/rbenv/bin:/usr/local/bin:/usr/bin:/bin | |
chdir /path/to/tdiary # Change direcotory | |
exec su -s /bin/sh -c "bundle exec tdiary server" tdiary-user # Change user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment