On debian (with init scripts) i'm using the attached script.
Which is not for upstart, but could help you finding the right way.
>
> In a problem that may be related, logging seems to be behaving
> strangely. If I delete the log files, and restart orbited (sudo stop
> orbited, sudo start orbited) then I get 4 entries in info.log:
>
> 10/17/09 11:22:58:362 INFO orbited.start proxy protocol active
> 10/17/09 11:22:58:363 INFO orbited.start Listening http@9000
> 10/17/09 11:22:58:363 INFO orbited.start Listening stomp@61613
> 10/17/09 11:22:58:372 INFO orbited.start switching to user
> orbited (uid=xxx) and group adm (gid=x)
>
> and the log files are written as user/group root. After that I get
> absolutely nothign in any log file. However, when I stop orbited
> again, warn and access suddenly fill up with entries!
>
> It's almost as if whilst the daemon is runnign as another user the
> logging is being suspended. I was wondering if this may be related to
> upstart not returning when orbited is started?
I don't think it's related at all to your previous problems.
It seems the logging facility is buffering output.
Regards,
Jérémy Lal
I'm not sure, but i guess it's not a matter of time,
and rather a matter of space ;)