summaryrefslogtreecommitdiffstats
path: root/etc/phpshellsessions/removeshaper
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-02-26 16:43:24 -0500
committerjim-p <jimp@pfsense.org>2013-02-26 16:43:54 -0500
commit375136d94fa62f9400177d3854823b2b08f7bc49 (patch)
tree40f92fbbb91de05cbdd1b78aba66bf8d89291ddd /etc/phpshellsessions/removeshaper
parenta3da3e4200f16e026c8e0758de1302e870f16cca (diff)
downloadpfsense-375136d94fa62f9400177d3854823b2b08f7bc49.zip
pfsense-375136d94fa62f9400177d3854823b2b08f7bc49.tar.gz
Add a pfSsh.php script to remove the shaper settings from the console if needed.
Diffstat (limited to 'etc/phpshellsessions/removeshaper')
-rw-r--r--etc/phpshellsessions/removeshaper24
1 files changed, 24 insertions, 0 deletions
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
OpenPOWER on IntegriCloud