• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

DNS Zone - Serial prbl -> solutions ?

R

romino

Guest
As you know, Plesk 8 doesn't create a correct serial number for zone files, wich can be a problem for .fr and .de tld's.

Plesk sent me a code that could resolve the problem.
What is your opinion on it? I didn't test it .... not wanting to have problem with my current sites ...

Here is the code:

----
#!/bin/sh
#Change directory to named's root/var
cd `awk '/^NAMED_RUN_ROOT_D/{print $2}' /etc/psa/psa.conf`/var

#Get active DNS zones (echo...|mysql...)
#Change all zone files inline (|xargs -r perl...-i)
echo 'SELECT `Z`.`name` FROM `domains` `D`, `dns_zone` `Z` WHERE\
`D`.`dns_zone_id`=`Z`.`id` AND `Z`.`type`="master" AND `D`.`status`=0;'\
| mysql -Nb -uadmin -p`cat /etc/psa/.psa.shadow` psa\
| xargs -r perl -pe '$_ =~ s~^(\s+)([^2]\d+)(\s+;\s+Serial.*)$~$1.(@a=localtime $2, sprintf("%04d%02d%02d%02d", $a[5]+1900, $a[4]+1, $a[3], ($a[2]*60+$a[1])/96)).$3~e;' -i

#Force named to reload its configuration and zones
/usr/sbin/rndc reload

#End of script
----
 
Back
Top