aboutsummaryrefslogtreecommitdiffstats
path: root/config/ntopng/ntopng.xml
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2014-08-15 18:49:18 -0400
committerjim-p <jimp@pfsense.org>2014-08-15 18:49:18 -0400
commit906e342cd9726889caec52e529cdad12022ec5d6 (patch)
treeff1f26f2b8f9f815bd5a6fc9922f1f249b050d5a /config/ntopng/ntopng.xml
parent6863a1edad9d683380bb36510f5e7565a61d3555 (diff)
downloadpfsense-packages-906e342cd9726889caec52e529cdad12022ec5d6.tar.gz
pfsense-packages-906e342cd9726889caec52e529cdad12022ec5d6.tar.bz2
pfsense-packages-906e342cd9726889caec52e529cdad12022ec5d6.zip
Fix redis path for 2.2 (ntopng)
Diffstat (limited to 'config/ntopng/ntopng.xml')
-rw-r--r--config/ntopng/ntopng.xml11
1 files changed, 9 insertions, 2 deletions
diff --git a/config/ntopng/ntopng.xml b/config/ntopng/ntopng.xml
index 2ba22dd7..5428d205 100644
--- a/config/ntopng/ntopng.xml
+++ b/config/ntopng/ntopng.xml
@@ -175,8 +175,15 @@
break;
}
+ $pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
+ if ($pf_version >= 2.2) {
+ $redis_path = "/usr/pbi/ntopng-" . php_uname("m") . "/local/bin";
+ } else {
+ $redis_path = "/usr/pbi/ntopng-" . php_uname("m") . "/bin";
+ }
+
$start = "ldconfig -m /usr/pbi/ntopng-i386/lib\n";
- $start .= "\t/usr/pbi/ntopng-" . php_uname("m") . "/bin/redis-server &\n";
+ $start .= "\t{$redis_path}/redis-server &\n";
// TODO:
// Add support for --data-dir /somewhere, --httpdocs-dir /somewhereelse,
// --dump-timeline (on/off) --http-port, --https-port
@@ -199,7 +206,7 @@
if (empty($ntopng_config['password']))
$ntopng_config['password'] = "admin";
$password = md5($ntopng_config['password']);
- mwexec_bg("/usr/pbi/ntopng-" . php_uname("m") . "/bin/redis-cli SET user.admin.password " . escapeshellarg($password));
+ mwexec_bg("{$redis_path}/redis-cli SET user.admin.password " . escapeshellarg($password));
conf_mount_ro();
config_unlock();
}