summaryrefslogtreecommitdiffstats
path: root/src/etc/phpshellsessions/removeshaper
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-08-26 15:12:02 -0300
committerRenato Botelho <renato@netgate.com>2015-08-26 15:12:02 -0300
commit03b19a93f4d8d870507ee96121cee4acd748dd2a (patch)
tree71a34e9e7e73d13de21cb4ad831799fb10c30df4 /src/etc/phpshellsessions/removeshaper
parent7f410a121522c5d0e2660256ae50c1fde1df3645 (diff)
parent30ce58ac1ea27b758d5112cb5a3b190c9760f010 (diff)
downloadpfsense-03b19a93f4d8d870507ee96121cee4acd748dd2a.zip
pfsense-03b19a93f4d8d870507ee96121cee4acd748dd2a.tar.gz
Merge branch 'master' into bootstrap
Diffstat (limited to 'src/etc/phpshellsessions/removeshaper')
-rw-r--r--src/etc/phpshellsessions/removeshaper25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/etc/phpshellsessions/removeshaper b/src/etc/phpshellsessions/removeshaper
new file mode 100644
index 0000000..298e618
--- /dev/null
+++ b/src/etc/phpshellsessions/removeshaper
@@ -0,0 +1,25 @@
+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