aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/tinydns/tinydns.inc9
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/tinydns/tinydns.inc b/packages/tinydns/tinydns.inc
index ad6e14cc..f5e6c1f4 100644
--- a/packages/tinydns/tinydns.inc
+++ b/packages/tinydns/tinydns.inc
@@ -149,17 +149,22 @@ function tinydns_custom_php_changeip_command() {
function tinydns_get_record_status($record, $pingthreshold = "", $wanpingthreshold = "") {
global $g, $config;
if(file_exists("/var/db/pingstatus/{$record}")) {
+ $status = "";
$status = file_get_contents("/var/db/pingstatus/{$record}");
if(stristr($status,"DOWN"))
return "DOWN";
}
if($pingthreshold) {
- $current_ms = file_get_contents("/var/db/pingmsstatus/$record");
+ $current_ms = "";
+ if(file_exists("var/db/pingmsstatus/$record"))
+ $current_ms = file_get_contents("/var/db/pingmsstatus/$record");
if($pingthreshold > $current_ms)
return "DOWN";
}
if($wanpingthreshold) {
- $current_avg = file_get_contents("/var/db/wanaverage");
+ $current_avg = "";
+ if(file_exists("/var/db/wanaverage"))
+ $current_avg = file_get_contents("/var/db/wanaverage");
if($wanpingthreshold > $current_avg)
return "DOWN";
}