diff options
author | doktornotor <notordoktor@gmail.com> | 2015-07-24 15:40:22 +0200 |
---|---|---|
committer | doktornotor <notordoktor@gmail.com> | 2015-07-24 15:40:22 +0200 |
commit | 7a1bc3c5b3a987be042502fc0c099785633f8784 (patch) | |
tree | 7e7a6f8f34365970cc31535e3f0b0bcd9a6199f9 | |
parent | 06a66c936672073525ea2626b85ccc42db104f16 (diff) | |
download | pfsense-packages-7a1bc3c5b3a987be042502fc0c099785633f8784.tar.gz pfsense-packages-7a1bc3c5b3a987be042502fc0c099785633f8784.tar.bz2 pfsense-packages-7a1bc3c5b3a987be042502fc0c099785633f8784.zip |
Fix - ntopng fails to copy fonts on install
-rw-r--r-- | config/ntopng/ntopng.xml | 10 |
1 files changed, 9 insertions, 1 deletions
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); |