aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiBa-NL <pba_2k3@yahoo.com>2014-05-13 00:16:26 +0200
committerPiBa-NL <pba_2k3@yahoo.com>2014-05-13 00:16:26 +0200
commit9e6166c1047d1310646b4f42690e9f5130a8ae86 (patch)
tree43431d82fb504f36583d7e6b2ef5df7e12b51a8c
parent0909bcf44cc4535c9dbb19f226fdb01c442175ff (diff)
downloadpfsense-packages-9e6166c1047d1310646b4f42690e9f5130a8ae86.tar.gz
pfsense-packages-9e6166c1047d1310646b4f42690e9f5130a8ae86.tar.bz2
pfsense-packages-9e6166c1047d1310646b4f42690e9f5130a8ae86.zip
fix tinc status page.
-rw-r--r--config/tinc/status_tinc.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/config/tinc/status_tinc.php b/config/tinc/status_tinc.php
index cd7b0aad..86ad5b29 100644
--- a/config/tinc/status_tinc.php
+++ b/config/tinc/status_tinc.php
@@ -12,8 +12,9 @@ function tinc_status_1() {
$clog_path = "/usr/local/sbin/clog";
} elseif (is_executable("/usr/sbin/clog")) {
$clog_path = "/usr/sbin/clog";
+ }
- if (!empty($clog_path))
+ if (!empty($clog_path)) {
exec("{$clog_path} /var/log/tinc.log | sed -e 's/.*tinc\[.*\]: //'",$result);
$i=0;
foreach($result as $line)
@@ -32,7 +33,8 @@ function tinc_status_1() {
$output .= $line . "\n";
$i++;
}
- return $output;
+ }
+ return $output;
}
function tinc_status_2() {
@@ -44,8 +46,9 @@ function tinc_status_2() {
$clog_path = "/usr/local/sbin/clog";
} elseif (is_executable("/usr/sbin/clog")) {
$clog_path = "/usr/sbin/clog";
+ }
- if (!empty($clog_path))
+ if (!empty($clog_path)) {
exec("{$clog_path} /var/log/tinc.log | sed -e 's/.*tinc\[.*\]: //'",$result);
$i=0;
foreach($result as $line)
@@ -64,7 +67,8 @@ function tinc_status_2() {
$output .= $line . "\n";
$i++;
}
- return $output;
+ }
+ return $output;
}
$shortcut_section = "tinc";