From 3b87bfcae6694fbac7c58f8a177f6d31662fe71e Mon Sep 17 00:00:00 2001 From: Perry Mason Date: Wed, 30 Jun 2010 12:59:15 +0200 Subject: [vnstat2] adding monthrotate and vnstati --- config/vnstat2/vnstat2.inc | 56 ++++++++++++++++++++++++++++++++++++++++ config/vnstat2/vnstat2.xml | 60 +++++++++++++++++++++++++++++++++++++++++-- config/vnstat2/vnstati.xml | 64 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 178 insertions(+), 2 deletions(-) create mode 100644 config/vnstat2/vnstati.xml (limited to 'config/vnstat2') diff --git a/config/vnstat2/vnstat2.inc b/config/vnstat2/vnstat2.inc index 75c4f9db..26e9acfd 100644 --- a/config/vnstat2/vnstat2.inc +++ b/config/vnstat2/vnstat2.inc @@ -24,6 +24,62 @@ function vnstat_install_deinstall() { configure_cron(); conf_mount_ro(); } +function change_vnstat_conf(){ + conf_mount_rw(); + global $config; + $monthrotate = $_POST['monthrotate']; + +// ************ Write new vnstat.conf ***************** + + $vnstat_conf_file = <<Currently there are no FAQ items provided. vnstat2 1.0 - vnstat2 + Vnstat2 /pkg_edit.php?xml=vnstat2.xml&id=0 /usr/local/pkg/vnstat2.inc vnstat2
Status
- /vnstat2 + /pkg_edit.php?xml=vnstat2.xml&id=0
+ + + Config + /pkg_edit.php?xml=vnstat2.xml&id=0 + + + + Vnstati + /pkg_edit.php?xml=vnstati.xml&id=0 + + + Access vnstat php frontend + /vnstat2 + + /usr/local/pkg/ 0644 @@ -32,6 +47,47 @@ 0644 http://www.pfsense.com/packages/config/vnstat2/bin/vnstat.conf + + + Change rotate day of the month (by default set to 1) + MonthRotate + monthrotate + select + 3 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + change_vnstat_conf(); vnstat_install_config(); vnstat_install_deinstall(); diff --git a/config/vnstat2/vnstati.xml b/config/vnstat2/vnstati.xml new file mode 100644 index 00000000..6e779fe6 --- /dev/null +++ b/config/vnstat2/vnstati.xml @@ -0,0 +1,64 @@ + + + + + + Describe your package here + Describe your package requirements here + Currently there are no FAQ items provided. + vnstat2 + 1.0 + Vnstat2 + /vnstati/newpicture.png + /usr/local/pkg/vnstat2.inc + + vnstat2 + +
Status
+ /pkg_edit.php?xml=vnstat2.xml&id=0 +
+ + + Config + /pkg_edit.php?xml=vnstat2.xml&id=0 + + + Vnstati + /pkg_edit.php?xml=vnstati.xml&id=0 + + + + Access vnstat php frontend + /vnstat2 + + + + + Interface + vnstat_interface + Select interface + interfaces_selection + + + Select output type + Output Type + output_type + select + 7 + + + + + + + + + + + + + create_vnstati_image(); + + vnstat_install_config(); + vnstat_install_deinstall(); +
-- cgit v1.2.3