mwan3: be more efficient with sleep after killing trackers
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
This commit is contained in:
parent
da9a626f78
commit
84a53b7c79
2 changed files with 13 additions and 5 deletions
|
@ -672,7 +672,9 @@ mwan3_track()
|
||||||
|
|
||||||
for pid in $(pgrep -f "mwan3track $1 $2"); do
|
for pid in $(pgrep -f "mwan3track $1 $2"); do
|
||||||
kill -TERM "$pid" > /dev/null 2>&1
|
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
|
kill -KILL "$pid" > /dev/null 2>&1
|
||||||
done
|
done
|
||||||
if [ -n "$track_ips" ]; then
|
if [ -n "$track_ips" ]; then
|
||||||
|
|
|
@ -64,7 +64,7 @@ ifup()
|
||||||
status=$(ubus -S call network.interface.$1 status)
|
status=$(ubus -S call network.interface.$1 status)
|
||||||
[ -n "$status" ] && {
|
[ -n "$status" ] && {
|
||||||
json_load "$status"
|
json_load "$status"
|
||||||
json_get_vars up l3_device
|
json_get_vars up l3_device
|
||||||
}
|
}
|
||||||
|
|
||||||
config_get enabled "$1" enabled 0
|
config_get enabled "$1" enabled 0
|
||||||
|
@ -141,13 +141,19 @@ stop()
|
||||||
|
|
||||||
for pid in $(pgrep -f "mwan3rtmon"); do
|
for pid in $(pgrep -f "mwan3rtmon"); do
|
||||||
kill -TERM "$pid" > /dev/null 2>&1
|
kill -TERM "$pid" > /dev/null 2>&1
|
||||||
sleep 1
|
|
||||||
kill -KILL "$pid" > /dev/null 2>&1
|
|
||||||
done
|
done
|
||||||
|
|
||||||
for pid in $(pgrep -f "mwan3track"); do
|
for pid in $(pgrep -f "mwan3track"); do
|
||||||
kill -TERM "$pid" > /dev/null 2>&1
|
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
|
kill -KILL "$pid" > /dev/null 2>&1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue