From 2a9676d8ba453086d5ac47a43daf3b81b1a2045c Mon Sep 17 00:00:00 2001 From: earnolmartin Date: Sat, 7 Oct 2023 12:08:38 -0600 Subject: [PATCH] Use Sequential Bind DNS Serial for Domains --- ehcp/classapp.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ehcp/classapp.php b/ehcp/classapp.php index e0cded5..aa56999 100755 --- a/ehcp/classapp.php +++ b/ehcp/classapp.php @@ -183,7 +183,8 @@ class Application 'ssl_wild_card' => 'bit(1) default b\'0\'', 'ssl_use_letsenc' => 'bit(1) default b\'0\'', 'ssl_redirect_https' => 'bit(1) default b\'0\'', - 'ssl_lets_enc_additional_hosts' => 'text' + 'ssl_lets_enc_additional_hosts' => 'text', + 'dns_serial' => 'int default 1', ) ), 'domainstable2' => array( @@ -12819,7 +12820,12 @@ sudo service ehcp start
// Will force it to pull updates because the master will have a larger serial number. $serialNum = 1; } else { - $serialNum = rand(2, 1000); + // Always add 1 to the serial + $newSerial = $ar1['dns_serial'] + 1; + $serialNum = $newSerial; + + // Update the serial number in the db + $this->executeQuery("update domains set dns_serial='" . $newSerial . "' where id='" . $ar1["id"] . "';"); } # end earnolmartin