Page 1 of 1

Dynamic Service Classes

Posted: Wed Sep 05, 2018 10:58 pm
by setham
Hello,

I want to dynamically change the class to specific "match criteria".

I tested the following and it seems to work (sleeps are to provide som settle time, not sure if is beneficial or detrimental):

Code: Select all

throttle.sh
/sbin/uci set qos_gargoyle.download_rule_400.class=dclass_6
/sbin/uci set qos_gargoyle.upload_rule_400.class=uclass_6
sleep 5
/etc/init.d/qos_gargoyle restart
sleep 5
/etc/init.d/firewall restart
sleep 5
/etc/init.d/bwmon_gargoyle restart
With this script, I am changing a group to a throttling class.

However, I think that the router is left is in a state where some things do not work well, or at least consistently.

For instance, I had seen the BW monitoring stop working and loss of internet connection. Or the web interface not behaving as usual.

Would someone please advise:

Am I executing the commands in the correct order?
Am I missing a command?

Thanks in advance for any help.

Re: Dynamic Service Classes

Posted: Thu Sep 06, 2018 12:13 am
by Lantis
You’re at least missing a “uci commit”

Don’t restart those services separately.
Just use /usr/bin/gargoyle/restart_firewall.sh

Re: Dynamic Service Classes

Posted: Thu Sep 06, 2018 10:59 pm
by setham
Thanks for replying, I will test it this weekend.

In 1.10.0 I found the command at:

Code: Select all

/usr/lib/gargoyle/restart_firewall.sh
Lantis wrote:You’re at least missing a “uci commit”

Don’t restart those services separately.
Just use /usr/bin/gargoyle/restart_firewall.sh