aboutsummaryrefslogtreecommitdiffstats
path: root/config/vnstat2
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2014-01-16 00:01:09 -0800
committerErmal Luçi <eri@pfsense.org>2014-01-16 00:01:09 -0800
commita05bf4cc5568d4223cae8778cc7999c0c2f09701 (patch)
tree89e5c99df52cca8ab58ae8f602213b9e68e95c10 /config/vnstat2
parentffd3976e16c9e3a28e5279dce68f0e545d04e43d (diff)
parentb5d08d42e40a687b6f4bbb0dba9551ce761d1e8a (diff)
downloadpfsense-packages-a05bf4cc5568d4223cae8778cc7999c0c2f09701.tar.gz
pfsense-packages-a05bf4cc5568d4223cae8778cc7999c0c2f09701.tar.bz2
pfsense-packages-a05bf4cc5568d4223cae8778cc7999c0c2f09701.zip
Merge pull request #574 from parawizard/master
Fixes for pbi paths and update to 1.5.1 php front end
Diffstat (limited to 'config/vnstat2')
-rw-r--r--config/vnstat2/vnstat2.inc62
-rw-r--r--config/vnstat2/vnstat2.xml10
2 files changed, 16 insertions, 56 deletions
diff --git a/config/vnstat2/vnstat2.inc b/config/vnstat2/vnstat2.inc
index 9e184758..54a15aa6 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");
@@ -196,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);
@@ -224,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';";
@@ -234,7 +240,7 @@ function vnstat_php_frontend(){
$config_file = <<<EOF
<?php
//
- // vnStat PHP frontend 1.4.1 (c)2006-2008 Bjorge Dijkstra (bjd@jooz.net)
+ // vnStat PHP frontend 1.5.1 (c)2006-2008 Bjorge Dijkstra (bjd@jooz.net)
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -261,7 +267,8 @@ function vnstat_php_frontend(){
//
// edit these to reflect your particular situation
//
-
+$locale
+$language
// list of network interfaces monitored by vnStat
$iface_list_array
@@ -301,53 +308,6 @@ $graph_format2
// and ALPHA from 0-127 where 0 is opaque and 127 completely transparent.
//
define('DEFAULT_COLORSCHEME', 'pfSense');
-
- $colorscheme2
- 'stylesheet' => '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;
diff --git a/config/vnstat2/vnstat2.xml b/config/vnstat2/vnstat2.xml
index 25cd0bcb..6d8ba41a 100644
--- a/config/vnstat2/vnstat2.xml
+++ b/config/vnstat2/vnstat2.xml
@@ -48,7 +48,7 @@
<additional_files_needed>
<prefix>/usr/local/pkg/</prefix>
<chmod>0644</chmod>
- <item>http://files.pfsense.org/packages/8/vnstat/vnstat_php_frontend-1.4.1.tar.gz</item>
+ <item>http://files.pfsense.org/packages/8/vnstat/vnstat_php_frontend-1.5.1-updated.tar.gz</item>
</additional_files_needed>
<additional_files_needed>
<prefix>/usr/local/pkg/</prefix>
@@ -68,22 +68,22 @@
<additional_files_needed>
<prefix>/usr/local/pkg/</prefix>
<chmod>0644</chmod>
- <item>http://files.pfsense.org/packages/8/vnstat/diag_vnstat.abc</item>
+ <item>http://www.pfsense.com/packages/config/vnstat2/bin/diag_vnstat.abc</item>
</additional_files_needed>
<additional_files_needed>
<prefix>/usr/local/pkg/</prefix>
<chmod>0644</chmod>
- <item>http://files.pfsense.org/packages/8/vnstat/diag_vnstat2.abc</item>
+ <item>http://www.pfsense.com/packages/config/vnstat2/bin/diag_vnstat2.abc</item>
</additional_files_needed>
<additional_files_needed>
<prefix>/usr/local/pkg/</prefix>
<chmod>0644</chmod>
- <item>http://files.pfsense.org/packages/8/vnstat/vnstat2_img.abc</item>
+ <item>http://www.pfsense.com/packages/config/vnstat2/bin/vnstat2_img.abc</item>
</additional_files_needed>
<additional_files_needed>
<prefix>/usr/local/pkg/</prefix>
<chmod>0644</chmod>
- <item>http://files.pfsense.org/packages/8/vnstat/vnstati.abc</item>
+ <item>http://www.pfsense.com/packages/config/vnstat2/bin/vnstati.abc</item>
</additional_files_needed>
<fields>
<field>