[haiku] Re: Some launch_daemon questions

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku@xxxxxxxxxxxxx
  • Date: Sun, 17 Jan 2016 19:25:45 +0100

Hi Mark,

Am 16/01/2016 um 15:14 schrieb Mark Hellegers:

I have created a few jobs to start what I want started. One is svnserve
and one is postgresql. They both start fine with a job, but this does
not work if I would want to start them as a service. I am assuming this
is beause they don't have an application signature. Is this correct?
One last job I have created does not seem to start my script (sh
script). Can I see some logging somewhere about what is going wrong? If
I run the command of the job in a shell it works fine.

Unfortunately, the logging capabilities are pretty much not existent yet. I planned to add syslog debug output to it one day, but haven't gotten around to do that (just like adding more features like cron...).

Is there a way to run a command when the system is shutdown? I would
rather shutdown postgresql gracefully instead of it getting terminated.

Not yet. The launch_daemon currently does not take part in the shutdown process (other than trying to continue to relaunch its services :-)).

I've given it (and other issues) a lot of thought over the last couple of months, and plan to cut quite some functionality out of the registrar (the Roster among it), and merge it into the launch_daemon.

Then the launch_daemon will perform team registration, and the shutdown process all by itself.

For now, you'd have to add those to the UserShutdownScript (or whatever it's called).

Is there a way to wait with starting a job until another job has been
started?

Yes, you can make one job depend on another. The first-login job does this already -- it depends on the Deskbar (requires x-vnd.Be-TSKB), and will, since it's in the normal launch queue (not restricted by any event, or target), launch as soon as the Deskbar launched.

Bye,
   Axel.

Other related posts: