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(-) (limited to 'config/ntopng') 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