Creating a startupitem for nsd
Gerben Wierda
gerben.wierda at rna.nl
Sun Aug 11 15:31:13 UTC 2019
Answering my own question: I had to add a ‘revision’ keyword in the Portfile. After that, the install re-installed.
Gerben Wierda
Chess and the Art of Enterprise Architecture <http://enterprisechess.com/>
Mastering ArchiMate <http://masteringarchimate.com/>
Architecture for Real Enterprises <https://www.infoworld.com/blog/architecture-for-real-enterprises/> at InfoWorld
On Slippery Ice <https://eapj.org/on-slippery-ice/> at EAPJ
> On 11 Aug 2019, at 16:19, Gerben Wierda <gerben.wierda at rna.nl> wrote:
>
> In addition, just editing the Portfile and running another port install is apparently not enough. How do I get MacPorts to just do the LaunchDaemon install after I have edited the Portfile?
>
> Gerben
>
>> On 11 Aug 2019, at 16:05, Gerben Wierda <gerben.wierda at rna.nl <mailto:gerben.wierda at rna.nl>> wrote:
>>
>> I’ve been playing around with MacPorts and I have installed nsd as an authoritative DNS server. (unbound doesn’t handle CNAME, so it is either use BIND or have both nsd and unbound)
>>
>> unbound comes with a LaunchDaemon plist, nsd doesn’t. So my first mod looks to be that I will have to change the portfile to include startupitem information.
>>
>> As I understand it:
>> I need to edit /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/net/nsd/Portfile <http://rsync.macports.org/macports/release/tarballs/ports/net/nsd/Portfile> (with port edit) and add the startup item stuff there directly (copy original to Portfile.orig first of course). Questions: If I do that, will not MacPorts overwrite my modified Portfile in some scenarios? Will port edit create the Portfile.orig?
>> And everything I need to do for this change can be done by modifying the Portfile.
>> And what I gather from the documentation that I can offer the diff later as an improvement.
>> Correct?
>>
>> It seems to me I just have to add this to the Portfile:
>>
>> startupitem.create yes
>> startupitem.name nsd
>> startupitem.start "${prefix}/sbin/nsd"
>> startupitem.stop "/bin/kill \$(cat ${prefix}/var/run/${name}/nsd.pid)"
>>
>> Gerben Wierda
>> Chess and the Art of Enterprise Architecture <http://enterprisechess.com/>
>> Mastering ArchiMate <http://masteringarchimate.com/>
>> Architecture for Real Enterprises <https://www.infoworld.com/blog/architecture-for-real-enterprises/> at InfoWorld
>> On Slippery Ice <https://eapj.org/on-slippery-ice/> at EAPJ
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20190811/b474c01d/attachment.html>
More information about the macports-users
mailing list