Created
June 20, 2012 01:17
-
-
Save reconbot/2957554 to your computer and use it in GitHub Desktop.
somethings wrong!
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 characters
description "node server" | |
start on filesystem or runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
respawn limit 10 5 | |
umask 022 | |
script | |
HOME=/home/deploy | |
. $HOME/.profile | |
cd $HOME/app | |
exec /usr/bin/node $HOME/app/index.js 2>&1 >> $HOME/logs/node.log | |
end script | |
post-start script | |
HOME=/home/deploy | |
PID=`status node | awk '/post-start/ { print $4 }'` | |
echo $PID > $HOME/pids/node.pid | |
end script | |
post-stop script | |
HOME=/home/deploy | |
rm -f $HOME/pids/node.pid | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
all I get are a bunch of status 2 erors and no log! what am I doing wrong?
Jun 19 21:11:12 localhost init: node main process (4239) terminated with status 2
Jun 19 21:11:12 localhost init: node main process ended, respawning