Macports 2.5.0 multiple startupitems

Joshua Root jmr at macports.org
Sun May 27 18:41:45 UTC 2018


On 2018-5-28 04:14 , macports at parvis.nl wrote:
> I would very much like to us several startupitems for munin's different daemons. 
> However I cannot find any documentation yet, other than patches, and that makes it difficult to read and understand.
> 
> I created a ticket [1] for not being able to compile the github 2.5 guide.
> 
> Perhaps one of your guru's can give a short summary?

There is an option called 'startupitems' that contains a list of
key/value pairs. These correspond to the various startupitem.* options.
It works a lot like the add_users option, with each pair applying to the
name that occurred most recently in the list.

To give an example:

startupitem.create	yes
startupitems		name foo \
			executable ${prefix}/bin/foo

This is exactly equivalent to:

startupitem.create	yes
startupitem.name	foo
startupitem.executable	${prefix}/bin/foo

But the interesting part is that you can do this:

startupitems		name foo \
			executable ${prefix}/bin/foo \
			name bar \
			start "${prefix}/bin/bar start" \
			stop "${prefix}/bin/bar shutdown" \
			pid ${prefix}/var/run/bar/bar.pid

This will create two launchd plists, org.macports.foo.plist and
org.macports.bar.plist. The former will launch an executable directly,
the latter will use a start/stop script and a pid file.

- Josh


More information about the macports-dev mailing list