using upstart in ubuntu

To automate a script create the configuration file of your app in

sudo emacs /etc/init/app.conf
Content of the file are as follows:
# application Server

description "applicationServer"
author      "Rahul Mehta <rahul23134654@gmail.com"

start on (net-device-up
    and local-filesystems
    and runlevel [2345])
stop on runlevel [016]

exec /usr/local/bin/node    /your/app/path/server.js
start on, stop on   and exec are the features when to start and stop your server.
we can start our server manuall by following commands :
   sudo start app
   sudo stop app
   suod status app

Refernces :

http://upstart.ubuntu.com/

http://upstart.ubuntu.com/getting-started.html

Advertisements

About rahul23134654

Hi, I am Rahul Meha , B.E. in (I.T.)
This entry was posted in Ubuntu/Linux. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s