init script
Daniel J. Luke
dluke at geeklair.net
Mon Mar 26 16:34:18 PDT 2012
On Mar 26, 2012, at 7:21 PM, Jeremy Lavergne wrote:
>> you need to run a script to startup and stop the service, the service insists on detaching itself so launchd will think it died, you need to perform an action on a system configuration change [restart-netchange, restart-wakeup, restart-dist-notify ...]
>
> I think I can address all but one of those examples, that one being the classic case where forking away from launchd is unacceptable.
>
> * a script to start and stop the service can basically create two KeepAlive:SuccessfulExit jobs
Maybe I'm misunderstanding the man page (or not creative enough), but I don't see how that would work...
> * restart-netchange is easily handled by KeepAlive:NetworkState
probably, although it's not exactly the same thing (eg, this is set for bind9 so that when new addresses appear it's restarted and can listen on them - it looks like KeepAlive:NetworkState will bring the job up when a single IPv4 or IPv6 address is assigned to an interface and not restart it if more are assigned later).
> * restart-wakeup and restart-dist-notify are not a single port
>
> In fact from a few greps, it seems most of the advanced uses for daemondo aren't utilized at all.
since most of the macports software is ported from systems where the startup/launching stuff is significantly less featureful, that's not surprising.
It's also worth noting that the KeepAlive stuff isn't in the man page on 10.5 (I don't have a 10.6 box handy to check if it's there or if it showed up with 10.7).
I'm all for using launchd directly where it we can, though.
--
Daniel J. Luke
+========================================================+
| *---------------- dluke at geeklair.net ----------------* |
| *-------------- http://www.geeklair.net -------------* |
+========================================================+
| Opinions expressed are mine and do not necessarily |
| reflect the opinions of my employer. |
+========================================================+
More information about the macports-users
mailing list