Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

up vote 2 down vote accepted

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

respawn
console none

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.