aboutsummaryrefslogtreecommitdiffstats
path: root/config/bacula-client/bacula-client_view_config.php
diff options
context:
space:
mode:
authorMarcello Coutinho <marcellocoutinho@gmail.com>2013-05-10 19:22:11 -0300
committerMarcello Coutinho <marcellocoutinho@gmail.com>2013-05-10 19:22:11 -0300
commit2aad6a9a4afde7b2618c760ac6dd611c0a941664 (patch)
treec60bdd4a9310bec9894ad8d6ae176178bcbc66a2 /config/bacula-client/bacula-client_view_config.php
parent331f25a607f5a53b7cee8e21b2d97b7204aee952 (diff)
downloadpfsense-packages-2aad6a9a4afde7b2618c760ac6dd611c0a941664.tar.gz
pfsense-packages-2aad6a9a4afde7b2618c760ac6dd611c0a941664.tar.bz2
pfsense-packages-2aad6a9a4afde7b2618c760ac6dd611c0a941664.zip
bacula-client - include pfsense version check
Diffstat (limited to 'config/bacula-client/bacula-client_view_config.php')
-rw-r--r--config/bacula-client/bacula-client_view_config.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/config/bacula-client/bacula-client_view_config.php b/config/bacula-client/bacula-client_view_config.php
index 7fa64cf4..021e1c15 100644
--- a/config/bacula-client/bacula-client_view_config.php
+++ b/config/bacula-client/bacula-client_view_config.php
@@ -34,6 +34,12 @@ $pfSversion = str_replace("\n", "", file_get_contents("/etc/version"));
if(strstr($pfSversion, "1.2"))
$one_two = true;
+ $pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
+if ($pf_version > 2.0)
+ define('BACULA_LOCALBASE', '/usr/pbi/bacula-' . php_uname("m"));
+else
+ define('BACULA_LOCALBASE','/usr/local');
+
$pgtitle = "Bacula-Client: View Configuration";
include("head.inc");
@@ -68,7 +74,7 @@ include("head.inc");
<td class="tabcont" >
<textarea id="varnishlogs" rows="50" cols="87%">
<?php
- $config_file = file_get_contents("/usr/local/etc/bacula-fd.conf");
+ $config_file = file_get_contents(BACULA_LOCALBASE."/etc/bacula-fd.conf");
echo $config_file;
?>
</textarea>