Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm planning on setting up a server using Ubuntu Lucid Lynx, which uses upstart. I'm not finding the documentation too intuitive, so I'd like to ask for a solution for my specific problem.

I'm currently using a script to start up my IPv6 tunnel with Freenet6/gogo6 - right now it's a simple script invoking a single command, and its configuration file:

 #! /bin/sh
/usr/local/gw6c/bin/gw6c -f /usr/local/gw6c/bin/gw6c.conf

Of course, when this goes down, it tends to be silent, and so I'd need to get in and restart it.

I'd like to set up an upstart script which will

  1. start this application on startup, functionally identical to the script I have
  2. restart this script as 'root' should the application fail
  3. enable me to restart the tunnel should anything go wrong.
share|improve this question
up vote 2 down vote accepted

The below script works on upstart on Ubuntu Lucid Lynx alpha 3

console none

start on (local-filesystems and net-device-up IFACE=eth0)
stop on [!12345]

chdir /usr/local/gw6c/bin/
exec /usr/local/gw6c/bin/gw6c 
end script
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .