aboutsummaryrefslogtreecommitdiffstats
path: root/config/vnstat2
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2015-03-19 14:18:25 -0400
committerjim-p <jimp@pfsense.org>2015-03-27 16:37:28 -0400
commit3bb04d95b0207b46a478c6a7ce8dfde893adebfb (patch)
treeb7d745a613709bbfeb33e7b0612eab9df9501fa3 /config/vnstat2
parent4c3acb0f9369d53b75fe1a87b6492404ed0c14d2 (diff)
downloadpfsense-packages-3bb04d95b0207b46a478c6a7ce8dfde893adebfb.tar.gz
pfsense-packages-3bb04d95b0207b46a478c6a7ce8dfde893adebfb.tar.bz2
pfsense-packages-3bb04d95b0207b46a478c6a7ce8dfde893adebfb.zip
A few simplifications in vnstat2
Diffstat (limited to 'config/vnstat2')
-rw-r--r--config/vnstat2/vnstat2.inc12
1 files changed, 5 insertions, 7 deletions
diff --git a/config/vnstat2/vnstat2.inc b/config/vnstat2/vnstat2.inc
index f248083e..c875be52 100644
--- a/config/vnstat2/vnstat2.inc
+++ b/config/vnstat2/vnstat2.inc
@@ -63,8 +63,8 @@ function change_vnstat_conf(){
$config['installedpackages']['vnstat2']['config'][0]['vnstat_phpfrontend'] = $_POST['vnstat_phpfrontend'];
write_conf_f();
write_config();
- $no_vnstat_phpfrontend = $config['installedpackages']['vnstat2']['config'][0]['vnstat_phpfrontend'];
- if ($no_vnstat_phpfrontend == "on"){
+
+ if ($config['installedpackages']['vnstat2']['config'][0]['vnstat_phpfrontend'] == "on"){
vnstat_php_frontend();
}
else {
@@ -195,12 +195,10 @@ function vnstat_install_config() {
}
vnstat_link_config();
// Add MonthRotate value to config.xml and write /usr/local/etc/vnstat.conf
- $no_monthrotate = $config['installedpackages']['vnstat2']['config'][0]['monthrotate'];
- if ($no_monthrotate == ""){
+ if ($config['installedpackages']['vnstat2']['config'][0]['monthrotate'] == ""){
$config['installedpackages']['vnstat2']['config'][0]['monthrotate'] = "1";
}
- $no_vnstat_phpfrontend = $config['installedpackages']['vnstat2']['config'][0]['vnstat_phpfrontend'];
- if ($no_vnstat_phpfrontend == "on"){
+ if ($config['installedpackages']['vnstat2']['config'][0]['vnstat_phpfrontend'] == "on"){
vnstat_php_frontend();
}
write_conf_f();
@@ -214,7 +212,7 @@ function vnstat_install_config() {
function vnstat_php_frontend(){
global $config;
// Copy vnstat_php_frontend to www
- exec("cp -a /usr/local/pkg/vnstat2/vnstat_php_frontend/. /usr/local/www/vnstat2/");
+ exec("/bin/cp -a /usr/local/pkg/vnstat2/vnstat_php_frontend/. /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);