Skip to content

Instantly share code, notes, and snippets.

@reconbot
Created June 20, 2012 01:17
Show Gist options
  • Save reconbot/2957554 to your computer and use it in GitHub Desktop.
Save reconbot/2957554 to your computer and use it in GitHub Desktop.
somethings wrong!
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
@reconbot
Copy link
Author

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

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