Bug 235915 - dns/nsnotifyd [patch] rc script - multiple instances.
Summary: dns/nsnotifyd [patch] rc script - multiple instances.
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dan Langille
URL: http://dotat.at/prog/nsnotifyd/
Depends on:
Reported: 2019-02-21 12:02 UTC by Leo Vandewoestijne
Modified: 2021-03-17 00:14 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (dvl)

nsnotifyd rc (951 bytes, patch)
2019-02-21 12:02 UTC, Leo Vandewoestijne
no flags Details | Diff
patched rc.d script, with added debugging (1.07 KB, text/plain)
2019-07-26 23:35 UTC, Dan Langille
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leo Vandewoestijne 2019-02-21 12:02:43 UTC
Created attachment 202231 [details]
nsnotifyd rc

I tried nsnotifyd, and could imagine someone would like to run different scripts, for -for example- ins/del/upd.
So I played with the rc script that Mark made (see below), and and enabled it for multiple use.

Not sure if I will use it myself, but I thought could be useful to others.
So, this is more a suggestion that a "problem report".

Further I'm not 100% sure if my adaptions are the most adequate, though peeking at other rc scripts I think it's OK.
Comment 1 Dan Langille freebsd_committer 2019-02-26 01:29:41 UTC
Can you elaborate more upon the different scripts?

You run multiple instances of nsnotifyd so you can do different things depending upon which zones are updated?
Comment 2 Leo Vandewoestijne 2019-03-05 13:39:33 UTC
Almost; different functions at different port, for example:

notify for dom.tld at port 5301 => add.sh
notify for dom.tld at port 5302 => xfr.sh
notify for dom.tld at port 5303 => del.sh

And with those scripts maintain DNS servers with limitations (like NSD that doesn't fully support DDNS, or PowerDNS which also has only partial support).

Also each server (Bind, Knot, NSD, Yadifa, PowerDNS) have it's own different remote control commands. This setup would allow to execute commands locally on a secondairy.

I have to add that I'm currently using another solution, but I thought it was a useful contribution.
However, I haven't tried it's support for metazones.
If you think it overcomplicates / rather keep it simple, then just ignore/close this report.
Comment 3 Dan Langille freebsd_committer 2019-07-26 23:24:53 UTC
I tried the patch tonight.  It did not apply cleanly, so I copy/pasted.

When running with existing configurations, I get:

[dan@nsnotify:~] $ sudo service nsnotifyd restart
Stopping nsnotifyd.
Waiting for PIDS: 18077.
eval: ${${...}: Bad substitution

I have:

$ grep nsnotify /etc/rc.conf
nsnotifyd_flags="-u nsnotifyd -P /var/run/nsnotifyd.pid -4 -a ...."

We don't want to break existing installs.
Comment 4 Dan Langille freebsd_committer 2019-07-26 23:34:54 UTC
The rc.d script I'm running with, including debugging, is attached.

When I run this script, this is the output:

$ sudo service nsnotifyd restart

exit: Illegal number: stopping

That's not right. That's the variable, not the value.
Comment 5 Dan Langille freebsd_committer 2019-07-26 23:35:55 UTC
Created attachment 206095 [details]
patched rc.d script, with added debugging
Comment 6 Dan Langille freebsd_committer 2021-03-17 00:14:09 UTC
Did my patch help you at all?