mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
mwan3: be more efficient with sleep after killing trackers
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
(cherry picked from commit 84a53b7c79)
This commit is contained in:
committed by
Florian Eckert
parent
d6b051b8c0
commit
ec45ff8052
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user