Using nsupdate in scripts

John Thurston john.thurston at alaska.gov
Mon Mar 21 18:27:37 UTC 2022


On 3/14/2022 3:11 PM, Philip Prindeville wrote:
> I was hoping that there's a trivial way to parse the named.conf file and figure out what it listens on for updates using a Bind utility, but I guess not...

The utility 'rndc status' will return the full path of the configuration 
file:
   rndc status | grep "configuration file:"

And the utility 'named-checkconf -px configfile' will print out the 
configuration in canonical form, from which you could grab anything you 
like.

But if what you want isn't in the configuration file (e.g. passed as a 
command-line parameter, or compiled in), then named-checkconf isn't 
going to help. To learn those, I think you'll need to query the 
operating system for information about the specif process. I'd be 
looking at pgrep and ps, but there's probably better ways to do it.



--
Do things because you should, not just because you can.

John Thurston    907-465-8591
John.Thurston at alaska.gov
Department of Administration
State of Alaska


More information about the bind-users mailing list