From 90e49b5d1125b143f29c84b0adbdb114e9d853a4 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 8 Dec 2006 22:59:00 +0000 Subject: Add millisecond ping failover threshold --- packages/tinydns/tinydns.inc | 6 +++++- packages/tinydns/tinydns_domains.xml | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/tinydns/tinydns.inc b/packages/tinydns/tinydns.inc index 3dfefa28..501ba8d9 100644 --- a/packages/tinydns/tinydns.inc +++ b/packages/tinydns/tinydns.inc @@ -209,7 +209,11 @@ function tinydns_setup_ping_items() { fwrite($fd, $ip . "|" . $domain['ipaddress'] . "|3|/usr/local/pkg/tinydns_down.php|/usr/local/pkg/tinydns_up.php\n"); if($domain['row']) { foreach($domain['row'] as $row) { - fwrite($fd, $ip . "|" . $row['failoverip'] . "|3|/usr/local/pkg/tinydns_down.php|/usr/local/pkg/tinydns_up.php\n"); + if($row['pingthreshold']) + $pingthreshold = $row['pingthreshold']; + else + $row['pingthreshold'] = ""; + fwrite($fd, $ip . "|" . $row['failoverip'] . "|3|/usr/local/pkg/tinydns_down.php|/usr/local/pkg/tinydns_up.php|{$pingthreshold}\n"); } } } diff --git a/packages/tinydns/tinydns_domains.xml b/packages/tinydns/tinydns_domains.xml index c2fd37f1..907d77e8 100644 --- a/packages/tinydns/tinydns_domains.xml +++ b/packages/tinydns/tinydns_domains.xml @@ -90,6 +90,12 @@ Adds this member to active group when host is alive. checkbox + + Ping threshold + pingthreshold + When the MS time is surpassed, item will failover to next host + input + -- cgit v1.2.3