upstart not working

Posted by dorelal on Server Fault See other posts from Server Fault or by dorelal
Published on 2010-04-08T19:45:33Z Indexed on 2010/04/08 19:53 UTC
Read the original article Hit count: 244

Filed under:
|

I saved the following file at /etc/init/nodejs.conf

description "node.js server"
author      "dorelal"

start on startup
stop on shutdown

script
    # We found $HOME is needed. Without it, we ran into problems
    export HOME="/root"

    exec /usr/local/bin/node /home/dorelal/nodejs.js 2>&1 >> /var/log/node.log
end script

Then I tried to start the server

> sudo initctl start nodejs
initctl: Unknown job: nodejs

Ubuntu information

> cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.10
DISTRIB_CODENAME=karmic
DISTRIB_DESCRIPTION="Ubuntu 9.10"

What do I need to do to start the server using upstart.

© Server Fault or respective owner

Related posts about upstart

Related posts about ubuntu