I’m trying to automate exporting the Server Admin settings with a script. I stumbled upon a possible bug in the serveradmin terminal command and I’m hoping someone can shed some light on my problem.
If I run the following command:
serveradmin -x settings dns > dns.plist
It will export the DNS settings as an xml plist file. I tired to import this file into Server Admin but it was not recognized. The problem with the XML file is it names the first key in the xml document configuration and it should be named DNS Config. Server Admin will only import the file if I manually change the first key name to DNS Config. If I export the same settings file from the Server Admin GUI, the xml file is formatted correctly.
My question is how can I get the serveradmin command to put the correct key name in so I don’t have to manually edit the key? Can I pass an argument in my command above to get the properly formatted key name?
I also tried exporting the file without the -x option. This dumped the file but when I tried to import it using the terminal, it would not import any of the DNS Zones. My ultimate goal is to use the command above with the “all” argument and have it properly format the xml file for all the services.
Any help with this issue would be greatly appreciated.
Thanks
Keith
Comments are closed