diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-02-04 20:23:27 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-02-04 20:23:27 +0000 |
commit | c0bd1a4e9e57393a7d2b2fc9c0b61bfdce5b26f0 (patch) | |
tree | 45af8a4402f804e872972fc426c33012e5da9e23 | |
parent | 58799594c9d848601bfdb9168601d7abf6f518ff (diff) | |
download | pfsense-packages-c0bd1a4e9e57393a7d2b2fc9c0b61bfdce5b26f0.tar.gz pfsense-packages-c0bd1a4e9e57393a7d2b2fc9c0b61bfdce5b26f0.tar.bz2 pfsense-packages-c0bd1a4e9e57393a7d2b2fc9c0b61bfdce5b26f0.zip |
* Note that this is pfSense package in bandwidth.conf
* Automatically start package on setup since it requires no input
-rw-r--r-- | packages/bandwidthd/bandwidthd.inc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/bandwidthd/bandwidthd.inc b/packages/bandwidthd/bandwidthd.inc index a70b9eb3..d0241e1c 100644 --- a/packages/bandwidthd/bandwidthd.inc +++ b/packages/bandwidthd/bandwidthd.inc @@ -38,6 +38,7 @@ function bandwidthd_install_deinstall() { function bandwidthd_install_config() { global $config, $g; + /* user defined values */ $meta_refresh = $config['installedpackages']['bandwidthd']['config'][0]['metarefresh']; if($meta_refresh) $meta_refresh = "meta_refresh $meta_refresh\n"; @@ -63,6 +64,7 @@ function bandwidthd_install_config() { if($skip_intervals) $skip_intervals = "skip_intervals $meta_refresh\n"; + /* initialize to "" */ $subnets = ""; $ifdescrs = array("lan", "wan"); for ($j = 1; isset($config['interfaces']['opt' . $j]); $j++) { @@ -82,6 +84,7 @@ function bandwidthd_install_config() { } } + /* initialize to "" */ $dev = ""; foreach($ifdescrs as $ifdescr) { $descr = convert_friendly_interface_to_real_interface_name($ifdescr); @@ -89,6 +92,12 @@ function bandwidthd_install_config() { } $config_file = <<<EOF +# +# This file was automatically generated by the pfSense +# package management system. Changing this file +# will lead to it being overwritten again when +# the package manage resyncs. +# #################################################### # Bandwidthd.conf # @@ -163,6 +172,8 @@ EOF; exec("echo \"Please start bandwidthd to populate this directory.\" > /usr/local/bandwidthd/htdocs/index.html"); + start_service("bandwidthd"); + } ?>
\ No newline at end of file |