NicToolServerAPI new_zone_record autoincrementing serial

Started by shaun, March 31, 2005, 03:27:40 PM

Previous topic - Next topic

shaun

I'm writing a script that will send all of my bind zones from my machines to nictool.  The script will run every xx minutes.  I used to just send them to my own database and as a precausion i would check agains the serial in my db to make sure it wasnt higher than the one i'm sending.  When creating the zone i can specify a serial number but when creating records the serial is auto incremented.  Anyway to tell new_zone_records to leave the serial alone.

I just realized after writing this that i might be able to write a work around where at the end of of the new_zone_records process that i edit the zone and reset the serial but if possible i'd still rather not have to do that.

Thanks in advance.


Shaun.

etherealnet

Well, it's kinda ghetto but why not just increment each zone back 1 notch before importing and then you will end up with the original value. Also you could increment the serials on the bind zones you are importing so they match.

shaun

It increments everytime i add a record so setting the serial -1 would not work.  I would need my script to count how many zones i have and then set the serial.

I have decided to ignore the serial check and just force the send.  I ran my script on one of my servers and it imported/sent 230 bind zones with out problem, the only problem i had was with 1 zone because of the quick search but thats another post Smile