Browse Source

mwan3: be more efficient with sleep after killing trackers

Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
lilik-openwrt-22.03
Aaron Goodman 4 years ago
parent
commit
84a53b7c79
2 changed files with 13 additions and 5 deletions
  1. +3
    -1
      net/mwan3/files/lib/mwan3/mwan3.sh
  2. +10
    -4
      net/mwan3/files/usr/sbin/mwan3

+ 3
- 1
net/mwan3/files/lib/mwan3/mwan3.sh View File

@ -672,7 +672,9 @@ mwan3_track()
for pid in $(pgrep -f "mwan3track $1 $2"); do
kill -TERM "$pid" > /dev/null 2>&1
sleep 1
done
sleep 1
for pid in $(pgrep -f "mwan3track $1 $2"); do
kill -KILL "$pid" > /dev/null 2>&1
done
if [ -n "$track_ips" ]; then


+ 10
- 4
net/mwan3/files/usr/sbin/mwan3 View File

@ -64,7 +64,7 @@ ifup()
status=$(ubus -S call network.interface.$1 status)
[ -n "$status" ] && {
json_load "$status"
json_get_vars up l3_device
json_get_vars up l3_device
}
config_get enabled "$1" enabled 0
@ -141,13 +141,19 @@ stop()
for pid in $(pgrep -f "mwan3rtmon"); do
kill -TERM "$pid" > /dev/null 2>&1
sleep 1
kill -KILL "$pid" > /dev/null 2>&1
done
for pid in $(pgrep -f "mwan3track"); do
kill -TERM "$pid" > /dev/null 2>&1
sleep 1
done
sleep 1
for pid in $(pgrep -f "mwan3rtmon"); do
kill -KILL "$pid" > /dev/null 2>&1
done
for pid in $(pgrep -f "mwan3track"); do
kill -KILL "$pid" > /dev/null 2>&1
done


Loading…
Cancel
Save