diff --git a/aircon.sh b/aircon.sh index 63142f6..1335170 100755 --- a/aircon.sh +++ b/aircon.sh @@ -1341,11 +1341,11 @@ function canping() { # send new arp req for n in ${!ip[@]}; do if [[ -n ${ip[$n]} ]]; then - if [[ -e $ARPING ]]; then + if [[ -e $ARPING ]]; then ${ARPING} -c10 -W0.2 -w4 -C1 -q ${ip[$n]} 2>/dev/null & - else + else ping -c 1 -w 1 -q ${ip[$n]} 2>/dev/null & - fi + fi fi done @@ -1357,7 +1357,7 @@ function canping() { for n in ${!ip[@]}; do if [[ -n ${ip[$n]} ]]; then arpres=$(arp -n ${ip[$n]} 2>/dev/null) - arprv=$? + arprv=$? mac=$(echo "$arpres" | egrep -v "Host|xpired" | awk '{print $2}') [[ $mac == *:* ]] && success=1 fi @@ -1885,7 +1885,7 @@ done shift $((OPTIND - 1)) if [[ ! -e $ARPING ]]; then - info "Warning: arping binary '$ARPING' not found, will use ping instead" + info "Warning: arping binary '$ARPING' not found, will use ping instead" fi if [[ -n $influxdb ]]; then