aboutsummaryrefslogtreecommitdiffstats
path: root/config/ntopng
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2015-09-16 22:50:19 +0200
committerdoktornotor <notordoktor@gmail.com>2015-09-16 22:50:19 +0200
commit3221116df2a569884ffadda1e69638c2dc55da43 (patch)
tree73168825c3cb8b9da44f90c4b5d5fc08a1484866 /config/ntopng
parent08fed6ad248ad6961dc5a3bc97589a737f07b718 (diff)
downloadpfsense-packages-3221116df2a569884ffadda1e69638c2dc55da43.tar.gz
pfsense-packages-3221116df2a569884ffadda1e69638c2dc55da43.tar.bz2
pfsense-packages-3221116df2a569884ffadda1e69638c2dc55da43.zip
ntopng - fix up 2.1.x vs. 2.2.x PBI mess
Argh! I hate the PBI thing with passion! Die!
Diffstat (limited to 'config/ntopng')
-rw-r--r--config/ntopng/ntopng.inc19
1 files changed, 14 insertions, 5 deletions
diff --git a/config/ntopng/ntopng.inc b/config/ntopng/ntopng.inc
index 55553241..73db1ab0 100644
--- a/config/ntopng/ntopng.inc
+++ b/config/ntopng/ntopng.inc
@@ -151,8 +151,10 @@ function ntopng_sync_package() {
$start = "";
$stop = "";
- if ($pf_version == "2.1" || $pf_version == "2.2") {
- $start .= "ldconfig -m /usr/pbi/ntopng-" . php_uname("m") . "/lib\n";
+ if ($pf_version == "2.2") {
+ $start .= "/sbin/ldconfig -m /usr/pbi/ntopng-" . php_uname("m") . "/local/lib\n";
+ } elseif ($pf_version == "2.1") {
+ $start .= "/sbin/ldconfig -m /usr/pbi/ntopng-" . php_uname("m") . "/lib\n";
}
$start .= "\t{$redis_path}/redis-server --dir /var/db/ntopng/ --dbfilename ntopng.rdb &\n";
// TODO:
@@ -206,7 +208,9 @@ function ntopng_redis_started() {
$redis_path = "/usr/local/bin";
}
if (!is_process_running("redis-server")) {
- if ($pf_version == "2.1" || $pf_version == "2.2") {
+ if ($pf_version == "2.2") {
+ mwexec("/sbin/ldconfig -m /usr/pbi/ntopng-" . php_uname("m") . "/local/lib");
+ } elseif ($pf_version == "2.1") {
mwexec("/sbin/ldconfig -m /usr/pbi/ntopng-" . php_uname("m") . "/lib");
}
mwexec_bg("{$redis_path}/redis-server --dir /var/db/ntopng/ --dbfilename ntopng.rdb");
@@ -260,7 +264,9 @@ function ntopng_update_geoip() {
$geoip_asnum = "https://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz";
$geoip_asnum_v6 = "https://download.maxmind.com/download/geoip/database/asnum/GeoIPASNumv6.dat.gz";
$pf_version = substr(trim(file_get_contents("/etc/version")), 0, 3);
- if ($pf_version == "2.1" || $pf_version == "2.2") {
+ if ($pf_version == "2.2") {
+ $output_dir = "/usr/pbi/ntopng-" . php_uname("m") . "/local/share/ntopng";
+ } elseif ($pf_version == "2.1") {
$output_dir = "/usr/pbi/ntopng-" . php_uname("m") . "/share/ntopng";
} else {
$output_dir = "/usr/local/share/ntopng";
@@ -285,8 +291,11 @@ function ntopng_update_geoip() {
function ntopng_fixup_geoip() {
$pf_version = substr(trim(file_get_contents("/etc/version")), 0, 3);
- if ($pf_version == "2.1" || $pf_version == "2.2") {
+ if ($pf_version == "2.2") {
$target_dir = "/usr/pbi/ntopng-" . php_uname("m") . "/local/share/ntopng/httpdocs/geoip";
+ $source_dir = "/usr/pbi/ntopng-" . php_uname("m") . "/local/share/ntopng";
+ } elseif ($pf_version == "2.1") {
+ $target_dir = "/usr/pbi/ntopng-" . php_uname("m") . "/share/ntopng/httpdocs/geoip";
$source_dir = "/usr/pbi/ntopng-" . php_uname("m") . "/share/ntopng";
} else {
$target_dir = "/usr/local/share/ntopng/httpdocs/geoip";