mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Update sqm autorate
This commit is contained in:
parent
8b270e7264
commit
ecf0b89798
6 changed files with 407 additions and 253 deletions
26
luci-app-sqm-autorate/root/usr/share/sqm-autorate/launcher.sh
Executable file
26
luci-app-sqm-autorate/root/usr/share/sqm-autorate/launcher.sh
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
cake_instances=(/root/cake-autorate/config.*.sh)
|
||||
cake_instance_pids=()
|
||||
|
||||
trap kill_cake_instances INT TERM EXIT
|
||||
|
||||
kill_cake_instances()
|
||||
{
|
||||
trap - INT TERM EXIT
|
||||
|
||||
echo "Killing all instances of cake one-by-one now."
|
||||
|
||||
for ((cake_instance=0; cake_instance<${#cake_instances[@]}; cake_instance++))
|
||||
do
|
||||
kill "${cake_instance_pids[${cake_instance}]}" 2>/dev/null || true
|
||||
done
|
||||
wait
|
||||
}
|
||||
|
||||
for cake_instance in "${cake_instances[@]}"
|
||||
do
|
||||
/root/cake-autorate/cake-autorate.sh "${cake_instance}" &
|
||||
cake_instance_pids+=(${!})
|
||||
done
|
||||
wait
|
||||
Loading…
Add table
Add a link
Reference in a new issue