description "Node app"
author "me"
start on runlevel [2345]
stop on runlevel [06]
pre-start script
exec logger "pre-start NODEJS-CHAT app"
end script
post-start script
exec logger "post-start NODEJS-chat app"
end script
script
exec logger "we are launching the NODEJS-CHAT app"
cd /var/www/html/nodejs-chat
exec sudo -u deploybot NODE_ENV=production /usr/local/bin/node /var/www/html/nodejs-chat/server.js >> /var/www/html/nodejs-chat/log/app.log 2>&1
end script
I'm running Centos 6.5 and upstart 0.6.5 (latest available through yum). The task above can be started by manually issuing the sudo -u ... command, but it won't launch on reboot or doesn't really execute when running start nodechat. The logging command works.
Any idea what can be wrong here?
0 Answers