|
|
@ -52,6 +52,7 @@ main() { |
|
|
|
INTERFACE=$1 |
|
|
|
DEVICE=$2 |
|
|
|
STATUS=$3 |
|
|
|
SRC_IP=$4 |
|
|
|
mkdir -p /var/run/mwan3track/$1 |
|
|
|
trap clean_up SIGINT SIGTERM |
|
|
|
trap if_down SIGUSR1 |
|
|
@ -93,11 +94,11 @@ main() { |
|
|
|
for track_ip in $track_ips; do |
|
|
|
case "$track_method" in |
|
|
|
ping) |
|
|
|
ping -I $2 -c $count -W $timeout -s $size -q $track_ip &> /dev/null ;; |
|
|
|
ping -I $DEVICE -c $count -W $timeout -s $size -q $track_ip &> /dev/null ;; |
|
|
|
arping) |
|
|
|
arping -I $2 -c $count -w $timeout -q $track_ip &> /dev/null ;; |
|
|
|
arping -I $DEVICE -c $count -w $timeout -q $track_ip &> /dev/null ;; |
|
|
|
httping) |
|
|
|
httping -y $3 -c $count -t $timeout -q $track_ip &> /dev/null ;; |
|
|
|
httping -y $SRC_IP -c $count -t $timeout -q $track_ip &> /dev/null ;; |
|
|
|
esac |
|
|
|
if [ $? -eq 0 ]; then |
|
|
|
let host_up_count++ |
|
|
|