I have an upstart script that does the following
start on runlevel  stop on runlevel  respawn pre-start script exec >/dev/kmsg 2>&1 REPOfirstname.lastname@example.org:blabla/bli mkdir -p /var/log mkdir -p /var/www echo "Fetching app from $REPO" girror $REPO /var/www if [ -f /var/www/package.json ]; then echo "Installing npm modules" cd /var/www npm install fi end script post-stop script exec >/dev/kmsg 2>&1 echo "stopped" end script script exec >/dev/kmsg 2>&1 export NODE_ENV=production export port=80 echo "Starting app.js on port 80" cd /var/www node app.js end script
I am running the script as root. The log files of the application suppose to go to
/var/log/syslog but they don't go there.
However, I do see the app log when running
dmesg | tail -f
Anyone know why it doesn't work ?