|
|
@ -25,14 +25,14 @@ main() { |
|
|
|
sleep 3 |
|
|
|
while true; do |
|
|
|
mwan3_lock "service" "mwan3rtmon" |
|
|
|
[ mwan3_remon_ipv4 = "1" ] || \ |
|
|
|
[ mwan3_rtmon_ipv6 = "1" ] && break |
|
|
|
mwan3_rtmon_ipv4 || mwan3_rtmon_ipv6 |
|
|
|
ret=$? |
|
|
|
mwan3_unlock "service" "mwan3rtmon" |
|
|
|
[ "$ret" = "0" ] || break |
|
|
|
[ "$rtmon_interval" = "0" ] && break |
|
|
|
sleep "$rtmon_interval" & |
|
|
|
wait |
|
|
|
done |
|
|
|
mwan3_unlock "service" "mwan3rtmon" |
|
|
|
} |
|
|
|
|
|
|
|
main "$@" |