[Ubuntu-SG] upstart help?
Ravi Mohan
faileas.greywolf at gmail.com
Sun Feb 28 09:20:56 UTC 2010
and... bingo.
script and end script seem to be mentioned as being essential in the docs
for some reason. There's no fancy forking of any sort... so just correcting
the start on line seems to fix it. Thanks for the help. I think i tried two
websites, and 2 irc channels before deciding to try the mailing list ;p
On Sun, Feb 28, 2010 at 2:50 PM, Chow Loong Jin <hyperair at gmail.com> wrote:
> On Sunday 28,February,2010 06:55 AM, Ravi Mohan wrote:
> > I'm currently planning on setting up lucid lynx on my new personal
> > server. On my old one, i'm using init.d to start my ipv6 tunnel provider
> > - (gogo6/free6 - they're the only one that'll work behind a nat, and
> > work in singapore ;p). I'm trying to set up a similar setup with upstart
> > (which has some advantages - such as restarting the script if it goes
> down).
> >
> > at the moment i can invoke this from command line- i want it to
> > automatically start after my networking is up, but before apache would-
> > as is, i think it starts before netwowking does. Can someone tell me
> > what i need to change?
> >
> > respawn
> > console none
> >
> > start on startup
> >
> > stop on shutdown
> >
> > script
> > exec /usr/local/gw6c/bin/gw6c -f /usr/local/gw6c/bin/gw6c.conf
> > emit free6_ipv6_started
> > end script
> >
> >
>
> start on (local-filesystems and net-device-up IFACE=eth0)
> stop on runlevel [!2345]
>
> !2345 means all the multi-user modes. If you want it to run in single-user
> mode
> as well, then use !12345.
>
> As for your script, you don't need to emit that event, as there will be an
> event
> "started <your-service-name>" event emitted automatically. Just drop the
> "script" and "end script" lines and you are good to go. I don't think you
> need
> to put the "console" line either.
>
> Also, if your service does the double-fork-to-background thing, put an
> "expect
> fork" line or init will do a fork bomb for you as it thinks your service
> has
> terminated/finished.
>
>
> `man 5 init` for more information.
>
> --
> Kind regards,
> Chow Loong Jin
>
>
> --
> Ubuntu-SG mailing list
> Ubuntu-SG at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-sg
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-sg/attachments/20100228/013b8aa6/attachment.html>
More information about the Ubuntu-SG
mailing list