From 375136d94fa62f9400177d3854823b2b08f7bc49 Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 26 Feb 2013 16:43:24 -0500 Subject: Add a pfSsh.php script to remove the shaper settings from the console if needed. --- etc/phpshellsessions/removeshaper | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 etc/phpshellsessions/removeshaper (limited to 'etc') diff --git a/etc/phpshellsessions/removeshaper b/etc/phpshellsessions/removeshaper new file mode 100644 index 0000000..2a221cd --- /dev/null +++ b/etc/phpshellsessions/removeshaper @@ -0,0 +1,24 @@ +require("config.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); +require_once("rrd.inc"); + +/* Much of this borrowed from firewall_shaper.php */ + +echo gettext("Removing shaper settings...\n"); + +unset($config['shaper']['queue']); +unset($queue); +unset($altq); + +foreach ($config['filter']['rule'] as $key => $rule) { + if (isset($rule['wizard']) && $rule['wizard'] == "yes") + unset($config['filter']['rule'][$key]); +} +if (write_config()) { + echo gettext("Shaper Successfully Removed.\n"); +} else { + echo gettext("Unable to write config.xml (Access Denied?)\n"); +} +filter_configure(); \ No newline at end of file -- cgit v1.1