I made a rather simple startup script for my node.js program that should run on startup:
start on startup stop on shutdown script exec sudo -u max WEBSITES_DIR=/home/max/websites/ /usr/local/bin/node /home/max/websites/server.js 2>&1 >> /var/log/node.log end script
If I use:
sudo start my-program
it works, but when I reboot the machine I get the error message:
init: my-program main process (325) terminated with status 2
Anybody any idea on how to debug this?