From 7a1bc3c5b3a987be042502fc0c099785633f8784 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Fri, 24 Jul 2015 15:40:22 +0200 Subject: Fix - ntopng fails to copy fonts on install --- config/ntopng/ntopng.xml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/config/ntopng/ntopng.xml b/config/ntopng/ntopng.xml index 778881e8..2d9cc366 100644 --- a/config/ntopng/ntopng.xml +++ b/config/ntopng/ntopng.xml @@ -156,7 +156,15 @@ safe_mkdir("/var/db/ntopng/rrd/graphics", 0755, true); system("/bin/chmod -R 755 /var/db/ntopng"); system("/usr/sbin/chown -R nobody:nobody /var/db/ntopng"); - system("/bin/cp -Rp /usr/local/lib/X11/fonts/webfonts/ /usr/local/lib/X11/fonts/TTF/"); + $pf_version=substr(trim(file_get_contents("/etc/version")),0,3); + if ($pf_version == "2.2") { + $fonts_path = "/usr/pbi/ntopng-" . php_uname("m") . "/local/lib/X11/fonts"; + } else if ($pf_version == "2.1") { + $fonts_path = "/usr/pbi/ntopng-" . php_uname("m") . "/local/lib/X11/fonts"; + } else { + $fonts_path = "/usr/local/lib/X11/fonts"; + } + system("/bin/cp -Rp {$fonts_path}/webfonts/ {$fonts_path}/TTF/"); $first = 0; foreach($ntopng_config['interface_array'] as $iface) { $if = convert_friendly_interface_to_real_interface_name($iface); -- cgit v1.2.3 From 41ac7ea4c49f6a29727ac81e7d54b2e3997f7fe1 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Fri, 24 Jul 2015 16:29:54 +0200 Subject: Bug #4567 - ntopng GeoIP files missing Use fetch instead of the broken ntopng-geoipupdate.sh binary. --- config/ntopng/ntopng.xml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/config/ntopng/ntopng.xml b/config/ntopng/ntopng.xml index 2d9cc366..ef155d18 100644 --- a/config/ntopng/ntopng.xml +++ b/config/ntopng/ntopng.xml @@ -254,12 +254,23 @@ config_unlock(); } function ntopng_update_geoip() { + $fetchcmd = "/usr/bin/fetch"; + $geolite_city = "https://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz"; + $geolite_city_v6 = "https://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz"; + $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") { - mwexec("/usr/pbi/ntopng-" . php_uname("m") . "/bin/ntopng-geoipupdate.sh"); + $output_dir = "/usr/pbi/ntopng-" . php_uname("m") . "/share/ntopng"; } else { - mwexec("/usr/local/bin/ntopng-geoipupdate.sh"); + $output_dir = "/usr/local/share/ntopng"; } + + mwexec("{$fetchcmd} -o {$output_dir} -T 5 {$geolite_city}"); + mwexec("{$fetchcmd} -o {$output_dir} -T 5 {$geolite_city_v6}"); + mwexec("{$fetchcmd} -o {$output_dir} -T 5 {$geoip_asnum}"); + mwexec("{$fetchcmd} -o {$output_dir} -T 5 {$geoip_asnum_v6}"); + ntopng_fixup_geoip(); restart_service("ntopng"); } -- cgit v1.2.3 From ae5fda5a3d72f9dd82891d48a293d1eee4a27472 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Fri, 24 Jul 2015 16:33:28 +0200 Subject: Bump ntopng package version --- pkg_config.10.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_config.10.xml b/pkg_config.10.xml index 5dbdf482..3d977045 100644 --- a/pkg_config.10.xml +++ b/pkg_config.10.xml @@ -300,7 +300,7 @@ databases/redis databases/gdbm net/GeoIP x11-fonts/font-util x11-fonts/webfonts graphics/graphviz net/ntopng - 0.6 + 0.7 ALPHA 2.2 https://packages.pfsense.org/packages/config/ntopng/ntopng.xml -- cgit v1.2.3 From a93e6b3077fe2cf43a09efebf9e38b0b1858c12b Mon Sep 17 00:00:00 2001 From: doktornotor Date: Fri, 24 Jul 2015 17:30:13 +0200 Subject: Fix up the 2.1.x font path Meh... should rather clean all that 2.1.x stuff eventually. And move all most of this to ntopng.inc. No time for that now. --- config/ntopng/ntopng.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/ntopng/ntopng.xml b/config/ntopng/ntopng.xml index ef155d18..225b3941 100644 --- a/config/ntopng/ntopng.xml +++ b/config/ntopng/ntopng.xml @@ -160,7 +160,7 @@ if ($pf_version == "2.2") { $fonts_path = "/usr/pbi/ntopng-" . php_uname("m") . "/local/lib/X11/fonts"; } else if ($pf_version == "2.1") { - $fonts_path = "/usr/pbi/ntopng-" . php_uname("m") . "/local/lib/X11/fonts"; + $fonts_path = "/usr/pbi/ntopng-" . php_uname("m") . "/lib/X11/fonts"; } else { $fonts_path = "/usr/local/lib/X11/fonts"; } -- cgit v1.2.3