I have an upstart script that does the following
start on runlevel [2345]
stop on runlevel [06]
respawn
pre-start script
exec >/dev/kmsg 2>&1
[email protected]: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
and to rsyslog but they don't go there.
I am using rsyslog to send logs to a remote server
I see the app log when running dmesg | tail -f
Using kernel 3.5.0-46
This script is working on another machine with an older kernel
Anyone know why it doesn't work here ?