From 5467c41f142542f428e6aa13442c775a465e34ae Mon Sep 17 00:00:00 2001 From: parawizard Date: Wed, 15 Jan 2014 23:20:11 -0500 Subject: Added links to fix pbi problem /w i386 and amd64 Line 154 // Check for pbi install and arch type then create symlinks if (file_exists('/usr/pbi/vnstat-i386')) { exec("ln -s /usr/local/etc/vnstat.conf /usr/pbi/vnstat-i386/etc/vnstat.conf"); } if (file_exists('/usr/pbi/vnstat-amd64')) { exec("ln -s /usr/local/etc/vnstat.conf /usr/pbi/vnstat-amd64/etc/vnstat.conf"); } --- config/vnstat2/vnstat2.inc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'config') diff --git a/config/vnstat2/vnstat2.inc b/config/vnstat2/vnstat2.inc index 9e184758..f0b76989 100644 --- a/config/vnstat2/vnstat2.inc +++ b/config/vnstat2/vnstat2.inc @@ -151,6 +151,9 @@ function vnstat_install_config() { // exec("[ -d /var/db/vnstat ] && mv /var/db/vnstat /conf/vnstat"); exec("[ -d /usr/local/pkg/vnstat ] && mv /usr/local/pkg/vnstat /conf/vnstat"); exec("[ ! -d /conf/vnstat ] && mkdir /conf/vnstat"); +// Check for pbi install and arch type then create symlinks + if (file_exists('/usr/pbi/vnstat-i386')) { exec("ln -s /usr/local/etc/vnstat.conf /usr/pbi/vnstat-i386/etc/vnstat.conf"); } + if (file_exists('/usr/pbi/vnstat-amd64')) { exec("ln -s /usr/local/etc/vnstat.conf /usr/pbi/vnstat-amd64/etc/vnstat.conf"); } // Copy files to web dir exec("[ ! -f /usr/local/www/diag_vnstat2.php ] && cp /usr/local/pkg/diag_vnstat2.abc /usr/local/www/diag_vnstat2.php"); exec("[ ! -f /usr/local/www/diag_vnstat.php ] && cp /usr/local/pkg/diag_vnstat.abc /usr/local/www/diag_vnstat.php"); -- cgit v1.2.3 From 2ff35acb404383c62cf4a25ed82d05803a79d6e8 Mon Sep 17 00:00:00 2001 From: parawizard Date: Wed, 15 Jan 2014 23:28:44 -0500 Subject: Update to frontend 1.5.1; fixes vnstat_php_frontend-1.5.1: -replaced the depreciated split() function with explode(); -renamed vnstat_php_frontend-1.5.1-updated config.php generation: -added two new static variables for vnstat_php_frontend-1.5.1; $locale and $language -updated version number // Unpack and move Vnstat frontend exec("cd .."); exec("tar -zxovf /usr/local/pkg/vnstat_php_frontend-1.5.1-updated.tar.gz"); exec("mv vnstat_php_frontend-1.5.1-updated /usr/local/www/vnstat2"); $locale = "\$locale = 'en_US.UTF-8';"; $language = "\$language = 'en';"; $locale $language --- config/vnstat2/vnstat2.inc | 59 +++++++--------------------------------------- 1 file changed, 8 insertions(+), 51 deletions(-) (limited to 'config') diff --git a/config/vnstat2/vnstat2.inc b/config/vnstat2/vnstat2.inc index f0b76989..54a15aa6 100644 --- a/config/vnstat2/vnstat2.inc +++ b/config/vnstat2/vnstat2.inc @@ -199,8 +199,8 @@ function vnstat_php_frontend(){ global $config; // Unpack and move Vnstat frontend exec("cd .."); - exec("tar -zxovf /usr/local/pkg/vnstat_php_frontend-1.4.1.tar.gz"); - exec("mv vnstat_php_frontend-1.4.1 /usr/local/www/vnstat2"); + exec("tar -zxovf /usr/local/pkg/vnstat_php_frontend-1.5.1-updated.tar.gz"); + exec("mv vnstat_php_frontend-1.5.1-updated /usr/local/www/vnstat2"); // Find information to be writing in config.php // $iface_list_array_items exec("ls /conf/vnstat/ | grep -v '\.'", $vnstat_nic_in); @@ -227,6 +227,9 @@ function vnstat_php_frontend(){ } $iface_title_array = implode($iface_title_array_items2); // php in php static items + // added to new items for the front end version 1.5.1 + $locale = "\$locale = 'en_US.UTF-8';"; + $language = "\$language = 'en';"; $vnstat_bin2 = "\$vnstat_bin = '/usr/local/bin/vnstat';"; $data_dir2 = "\$data_dir = './dumps';"; $graph_format2 ="\$graph_format='svg';"; @@ -237,7 +240,7 @@ function vnstat_php_frontend(){ $config_file = << 'vnstat.css', - 'image_background' => array( 255, 255, 255, 0 ), - 'graph_background' => array( 220, 220, 230, 0 ), - 'graph_background_2' => array( 205, 205, 220, 0 ), - 'grid_stipple_1' => array( 140, 140, 140, 0 ), - 'grid_stipple_2' => array( 200, 200, 200, 0 ), - 'border' => array( 0, 0, 0, 0 ), - 'text' => array( 0, 0, 0, 0 ), - 'rx' => array( 190, 190, 20, 50 ), - 'rx_border' => array( 40, 80, 40, 90 ), - 'tx' => array( 130, 160, 100, 50 ), - 'tx_border' => array( 80, 40, 40, 90 ) - ); - - // A red colorscheme based on a contribution by Enrico Tröger - $colorscheme3 - 'stylesheet' => 'vnstat_red.css', - 'image_background' => array( 225, 225, 225, 0 ), - 'graph_background' => array( 220, 220, 230, 0 ), - 'graph_background_2' => array( 205, 205, 220, 0 ), - 'grid_stipple_1' => array( 140, 140, 140, 0 ), - 'grid_stipple_2' => array( 200, 200, 200, 0 ), - 'border' => array( 0, 0, 0, 0 ), - 'text' => array( 0, 0, 0, 0 ), - 'rx' => array( 190, 20, 20, 50 ), - 'rx_border' => array( 80, 40, 40, 90 ), - 'tx' => array( 130, 130, 130, 50 ), - 'tx_border' => array( 60, 60, 60, 90 ) - ); - - // A red colorscheme based on a contribution by Perry Mason - $colorscheme4 - 'stylesheet' => 'vnstat_pfSense.css', - 'image_background' => array( 240, 240, 240, 0 ), - 'graph_background' => array( 255, 255, 255, 0 ), - 'graph_background_2' => array( 255, 255, 255, 0 ), - 'grid_stipple_1' => array( 144, 0, 0, 0 ), - 'grid_stipple_2' => array( 144, 0, 0, 0 ), - 'border' => array( 0, 0, 0, 0 ), - 'text' => array( 0, 0, 0, 0 ), - 'rx' => array( 190, 20, 20, 50 ), - 'rx_border' => array( 80, 40, 40, 90 ), - 'tx' => array( 130, 130, 130, 50 ), - 'tx_border' => array( 60, 60, 60, 90 ) - ); ?> EOF; -- cgit v1.2.3 From 855d7e7366a38e32ffa718d6da5683c0c1bbb109 Mon Sep 17 00:00:00 2001 From: parawizard Date: Wed, 15 Jan 2014 23:33:02 -0500 Subject: comments, vnstat conf version #, indents --- config/vnstat2/vnstat2.inc | 1 + 1 file changed, 1 insertion(+) (limited to 'config') diff --git a/config/vnstat2/vnstat2.inc b/config/vnstat2/vnstat2.inc index 54a15aa6..c528a5b4 100644 --- a/config/vnstat2/vnstat2.inc +++ b/config/vnstat2/vnstat2.inc @@ -199,6 +199,7 @@ function vnstat_php_frontend(){ global $config; // Unpack and move Vnstat frontend exec("cd .."); +// Updated 1.5.1 to removed split() which is depreciated in vnstat.php exec("tar -zxovf /usr/local/pkg/vnstat_php_frontend-1.5.1-updated.tar.gz"); exec("mv vnstat_php_frontend-1.5.1-updated /usr/local/www/vnstat2"); // Find information to be writing in config.php -- cgit v1.2.3 From 7fa0cea1e0b2f771291c0395fd7a72c4e94fa606 Mon Sep 17 00:00:00 2001 From: Bryan Paradis Date: Thu, 16 Jan 2014 00:26:34 -0500 Subject: updated additional package for php front end 1.5.1 --- config/vnstat2/vnstat2.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/vnstat2/vnstat2.xml b/config/vnstat2/vnstat2.xml index 25cd0bcb..df1cd70e 100644 --- a/config/vnstat2/vnstat2.xml +++ b/config/vnstat2/vnstat2.xml @@ -48,7 +48,7 @@ /usr/local/pkg/ 0644 - http://files.pfsense.org/packages/8/vnstat/vnstat_php_frontend-1.4.1.tar.gz + http://files.pfsense.org/packages/8/vnstat/vnstat_php_frontend-1.5.1-updated.tar.gz /usr/local/pkg/ -- cgit v1.2.3 From ee85f7513ded4e080758e87f9e482dbeff064d8e Mon Sep 17 00:00:00 2001 From: Bryan Paradis Date: Thu, 16 Jan 2014 00:55:29 -0500 Subject: Corrected the .abc file paths! They were pointed at files.pfsense.org before --- config/vnstat2/vnstat2.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'config') diff --git a/config/vnstat2/vnstat2.xml b/config/vnstat2/vnstat2.xml index df1cd70e..6d8ba41a 100644 --- a/config/vnstat2/vnstat2.xml +++ b/config/vnstat2/vnstat2.xml @@ -68,22 +68,22 @@ /usr/local/pkg/ 0644 - http://files.pfsense.org/packages/8/vnstat/diag_vnstat.abc + http://www.pfsense.com/packages/config/vnstat2/bin/diag_vnstat.abc /usr/local/pkg/ 0644 - http://files.pfsense.org/packages/8/vnstat/diag_vnstat2.abc + http://www.pfsense.com/packages/config/vnstat2/bin/diag_vnstat2.abc /usr/local/pkg/ 0644 - http://files.pfsense.org/packages/8/vnstat/vnstat2_img.abc + http://www.pfsense.com/packages/config/vnstat2/bin/vnstat2_img.abc /usr/local/pkg/ 0644 - http://files.pfsense.org/packages/8/vnstat/vnstati.abc + http://www.pfsense.com/packages/config/vnstat2/bin/vnstati.abc -- cgit v1.2.3 From b5d08d42e40a687b6f4bbb0dba9551ce761d1e8a Mon Sep 17 00:00:00 2001 From: Bryan Paradis Date: Thu, 16 Jan 2014 02:45:43 -0500 Subject: removed redundant comment --- config/vnstat2/vnstat2.inc | 1 - 1 file changed, 1 deletion(-) (limited to 'config') diff --git a/config/vnstat2/vnstat2.inc b/config/vnstat2/vnstat2.inc index c528a5b4..54a15aa6 100644 --- a/config/vnstat2/vnstat2.inc +++ b/config/vnstat2/vnstat2.inc @@ -199,7 +199,6 @@ function vnstat_php_frontend(){ global $config; // Unpack and move Vnstat frontend exec("cd .."); -// Updated 1.5.1 to removed split() which is depreciated in vnstat.php exec("tar -zxovf /usr/local/pkg/vnstat_php_frontend-1.5.1-updated.tar.gz"); exec("mv vnstat_php_frontend-1.5.1-updated /usr/local/www/vnstat2"); // Find information to be writing in config.php -- cgit v1.2.3