Search Again:

Re: Setting up secondaries..

From: billc@greenbuilder.com
Date: Monday, November 15, 1999
Time: 8:12:00 pm


>>Does anyone have a solution that could automate the creation of secondary
>>domains in QDNSPro?
>
>All you had to do was ask! ;)
>
>I've built you an AppleScript to do the job. It should be run on the
>secondary server, ideally (*** don't run it on the primary ***). It
>has some setup requirements, though:

Hmm. I just tried this, and it didn't work for me. If I had QDNSAdmin
closed I got an error at "(name of every document) as list", and if it was
open I got an error at "make new SD record at end of document "Secondary
Domains".". (couldn't find QDNS Admin)

I'm not real fluent with applescript, so I could easily be missing something.

Any clues?

>
>1) Mount the primary server's hard drive through AppleShare.
>Alternatively, copy all your domain files to the secondary by any
>means available - don't put them anywhere in the QuickDNS Data folder.

I did the copy method. Put them on the desktop

>
>2) Open all the zone files that you want this server to serve (over
>AppleShare, as indicated in step 1).

I assume by this you mean the primary data that I just copied over. QDNS
Admin opens, showing the primary records.

>
>3) Open the Secondary Data window. If there are any entries, either
>close the corresponding domain files or remove the entries.

Copied my existing Secondary Domains file (just in case), and deleted all
the entries on the original. Moved all files from Secodary Data folder to
Secondary Data (disabled) folder.

>
>Then copy the following script into a Script Editor window, change
>the property at the top to the address of the primary, and run it
>(remove extraneous line breaks caused by email transmission, of
>course).

did that.

>
>_______________________________________________________________________
>
>property primaryServer : "192.168.0.1"
>
>tell application "QuickDNS Pro Admin"
> set theDomainList to (name of every document) as list
> repeat with theDomain in theDomainList
> set theName to (theDomain as text)
> if theName is not "Secondary Domains" then
> set theRecord to make new SD record at end of
>document "Secondary Domains"
> set name of theRecord to theName
> set filename of theRecord to theName
> set first IP number of theRecord to primaryServer
> end if
> end repeat
>end tell
>
>_______________________________________________________________________
>
>After the script is done running, save the Secondary Domains window.



Messages In This Thread:



Return to Digital Point Solutions' Home Page