contrib/meshwizard: add support for setting up qos on wan
[project/luci.git] / contrib / package / meshwizard / files / usr / bin / meshwizard / helpers / setup_qos.sh
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_qos.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_qos.sh
new file mode 100755 (executable)
index 0000000..25884b3
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh
+# sets up qos-scripts for the wan interface
+
+. /lib/functions.sh
+. $dir/functions.sh
+
+if [ ! -f /etc/config/qos ]; then
+       echo "NOT setting up QOS because /etc/config/qos-scripts was not found"
+else
+       uci batch <<- EOF
+               set qos.wan.enabled=1
+               set qos.wan.upload=$wan_up
+               set qos.wan.download=$wan_down
+       EOF
+       uci_commitverbose "Setup QOS on WAN interface." qos
+
+fi