I have a simple monit service set up, so I have
something to keep my node.js server running. The service works
fine, but I can't get stdout to log to a file. I'm not sure what
I'm doing wrong here, if I call the command directly it works
fine, but Monit must be wrapping it somehow that stdout is not
being written to the file properly. Here is my monit.d script:
check host nodechat with address 127.0.0.1
program = "/usr/local/bin/node /home/node/chat_blog/chat.js
program = "/usr/bin/pkill -f 'node
failed port 8000 protocol HTTP
timeout 10 seconds
If I execute "/usr/local/bin/node
/home/node/chat_blog/chat.js > /var/log/nodechat.log"
directly (without the quotes) it works fine.