1

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.
2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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