aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/bandwidthd/bandwidthd.inc10
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/bandwidthd/bandwidthd.inc b/packages/bandwidthd/bandwidthd.inc
index a36159cf..42fe39a4 100644
--- a/packages/bandwidthd/bandwidthd.inc
+++ b/packages/bandwidthd/bandwidthd.inc
@@ -29,15 +29,22 @@
*/
function bandwidthd_install_deinstall() {
+ conf_mount_rw();
+ config_lock();
exec("cd /var/db/pkg/ && pkg_delete `ls | grep bandwidthd`");
exec("rm /usr/local/etc/rc.d/bandwidthd*");
exec("rm -rf /usr/local/bandwidthd*");
exec("rm /usr/local/www/bandwidthd");
+ conf_mount_ro();
+ config_unlock();
}
function bandwidthd_install_config() {
global $config, $g;
+ conf_mount_rw();
+ config_lock();
+
/* user defined values */
$meta_refresh = $config['installedpackages']['bandwidthd']['config'][0]['metarefresh'];
if($meta_refresh)
@@ -173,6 +180,9 @@ EOF;
exec("echo \"Please start bandwidthd to populate this directory.\" > /usr/local/bandwidthd/htdocs/index.html");
+ conf_mount_ro();
+ config_unlock();
+
start_service("bandwidthd");
}