diff options
-rw-r--r-- | packages/tinydns/tinydns.inc | 4 | ||||
-rw-r--r-- | packages/tinydns/tinydns_status.php | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/packages/tinydns/tinydns.inc b/packages/tinydns/tinydns.inc index 4dc131e8..10a05670 100644 --- a/packages/tinydns/tinydns.inc +++ b/packages/tinydns/tinydns.inc @@ -164,7 +164,7 @@ function tinydns_get_record_status($record, $pingthreshold = "", $wanpingthresho global $g, $config; if(file_exists("/var/db/pingstatus/{$record}")) { $status = file_get_contents("/var/db/pingstatus/{$record}"); - if($status == "DOWN") + if(stristr($status,"DOWN")) return false; } if($pingthreshold) { @@ -189,7 +189,7 @@ function tinydns_get_backup_record($record) { if(!$domain['row']) return $record; foreach($domain['row'] as $row) { - $status = tinydns_get_record_status($record); + $status = tinydns_get_record_status($row['failoverip']); if($status) return $row['failoverip']; } diff --git a/packages/tinydns/tinydns_status.php b/packages/tinydns/tinydns_status.php index 007793a8..13ac4e8c 100644 --- a/packages/tinydns/tinydns_status.php +++ b/packages/tinydns/tinydns_status.php @@ -96,5 +96,6 @@ foreach($pingdir as $ping) { </table> </div> <?php include("fend.inc"); ?> +<meta http-equiv="refresh" content="60;url=<?php print $_SERVER['SCRIPT_NAME']; ?>"> </body> </html> |