lower default TTL to 1 hour
this actually raises availability when changes occur in the infrastructure and smooths transitions. 1 day TTLs was relevant back when DNS servers and traffic were much slower i do not think it is relevant anymore, and 1h seems much more reasonable
This commit is contained in:
parent
f204ceeb71
commit
87c2352d61
|
@ -1501,7 +1501,7 @@ class m_dom {
|
|||
* TRUE sinon.
|
||||
*
|
||||
*/
|
||||
function edit_domain($dom, $dns, $gesmx, $force = false, $ttl = 86400) {
|
||||
function edit_domain($dom, $dns, $gesmx, $force = false, $ttl = 3600) {
|
||||
global $db, $err, $L_MX, $classes, $cuid, $hooks;
|
||||
$err->log("dom", "edit_domain", $dom . "/" . $dns . "/" . $gesmx);
|
||||
// Locked ?
|
||||
|
@ -1528,7 +1528,7 @@ class m_dom {
|
|||
|
||||
# Can't have ttl == 0. There is also a check in function_dns
|
||||
if ($ttl == 0) {
|
||||
$ttl = 86400;
|
||||
$ttl = 3600;
|
||||
}
|
||||
|
||||
$t = checkfqdn($dom);
|
||||
|
|
|
@ -115,7 +115,7 @@ CREATE TABLE IF NOT EXISTS domaines (
|
|||
noerase tinyint(4) NOT NULL default '0',
|
||||
dns_action enum ('OK','UPDATE','DELETE') NOT NULL default 'UPDATE',
|
||||
dns_result varchar(255) not null default '',
|
||||
zonettl int(10) unsigned NOT NULL default '86400',
|
||||
zonettl int(10) unsigned NOT NULL default '3600',
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY (domaine)
|
||||
) ENGINE=MyISAM;
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
ALTER TABLE `actions` CHANGE `type` `type` ENUM('CREATE_FILE','FIX_USER','CREATE_DIR','DELETE','MOVE','FIX_DIR','FIX_FILE','CHMOD') DEFAULT NULL ;
|
||||
|
||||
-- lower default TTL
|
||||
ALTER TABLE `domaines` CHANGE `zonettl` `zonettl` int(10) unsigned NOT NULL default '3600';
|
||||
|
|
|
@ -8,7 +8,7 @@ domaines:
|
|||
noerase : 0
|
||||
dns_action : OK
|
||||
dns_result : 0
|
||||
zonettl : 86400
|
||||
zonettl : 3600
|
||||
-
|
||||
id : 2
|
||||
compte : 2001
|
||||
|
@ -18,4 +18,4 @@ domaines:
|
|||
noerase : 0
|
||||
dns_action : OK
|
||||
dns_result : 0
|
||||
zonettl : 86400
|
||||
zonettl : 3600
|
||||
|
|
|
@ -42,10 +42,10 @@ dns_get_zonettl() {
|
|||
)
|
||||
# default value
|
||||
if [ "$zonettl" == "" ] ; then
|
||||
zonettl="86400"
|
||||
zonettl="3600"
|
||||
fi
|
||||
if [ "$zonettl" -eq "0" ] ; then
|
||||
zonettl="86400"
|
||||
zonettl="3600"
|
||||
fi
|
||||
echo $zonettl
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue