D
Deleted member 27741
Guest
Hey all, been a long time since I rapped at ya.
I use bandwidth limiter a lot so it would be very nice to be able to script some gui actions.
I have a script that is supposed to make the bandwidth limiter "active" or "suspended." It does not work. Here is the script:
#!/bin/sh
# echo $PATH | grep -q "\/sbin" || export PATH=$PATH:/sbin:/usr/sbin
logger -p 1 -t $(basename $0) "STARTING SCRIPT, PARAMETER: $1"
nvram show|grep qos_suspend
nvram set qos_suspend=1
nvram committ
service stop_qos
sleep 5
service start_qos
I have another script to do the opposite (set qos_suspend=0).
These scripts do not work and this is what the log says when I run them:
Jan 24 15:24:04 qossuspend.sh: STARTING SCRIPT, PARAMETER:
Jan 24 15:24:07 rc_service: service 2081:notify_rc stop_qos
Jan 24 15:24:12 rc_service: service 2115:notify_rc start_qos
Jan 24 15:24:12 qos-rules: apply rules (/tmp/mangle_rules) success!
Jan 24 15:24:12 qos-init: using wan_ifname eth0
Jan 24 15:24:12 qos-init: bwl start complete
Of course, setting things through the gui works and this is what the log has to say about that:
Jan 24 15:25:12 rc_service: httpd 470:notify_rc stop_qos
Jan 24 15:25:27 rc_service: httpd 470:notify_rc start_qos
Jan 24 15:25:27 qos-rules: apply rules (/tmp/mangle_rules) success!
Jan 24 15:25:27 qos-init: using wan_ifname eth0
Jan 24 15:25:27 qos-init: bwl start complete
I am missing something you geniuses can figure out. Help a dumb guy out today!
I use bandwidth limiter a lot so it would be very nice to be able to script some gui actions.
I have a script that is supposed to make the bandwidth limiter "active" or "suspended." It does not work. Here is the script:
#!/bin/sh
# echo $PATH | grep -q "\/sbin" || export PATH=$PATH:/sbin:/usr/sbin
logger -p 1 -t $(basename $0) "STARTING SCRIPT, PARAMETER: $1"
nvram show|grep qos_suspend
nvram set qos_suspend=1
nvram committ
service stop_qos
sleep 5
service start_qos
I have another script to do the opposite (set qos_suspend=0).
These scripts do not work and this is what the log says when I run them:
Jan 24 15:24:04 qossuspend.sh: STARTING SCRIPT, PARAMETER:
Jan 24 15:24:07 rc_service: service 2081:notify_rc stop_qos
Jan 24 15:24:12 rc_service: service 2115:notify_rc start_qos
Jan 24 15:24:12 qos-rules: apply rules (/tmp/mangle_rules) success!
Jan 24 15:24:12 qos-init: using wan_ifname eth0
Jan 24 15:24:12 qos-init: bwl start complete
Of course, setting things through the gui works and this is what the log has to say about that:
Jan 24 15:25:12 rc_service: httpd 470:notify_rc stop_qos
Jan 24 15:25:27 rc_service: httpd 470:notify_rc start_qos
Jan 24 15:25:27 qos-rules: apply rules (/tmp/mangle_rules) success!
Jan 24 15:25:27 qos-init: using wan_ifname eth0
Jan 24 15:25:27 qos-init: bwl start complete
I am missing something you geniuses can figure out. Help a dumb guy out today!