diff --git a/conn.sh b/conn.sh index f651058..14b2559 100644 --- a/conn.sh +++ b/conn.sh @@ -68,7 +68,7 @@ fi echo "-------------------Availability----------------------" echo "note: this seems to be a windows machine which does not respond to ICMP" echo "-----------------------------------------------------" - elif [[ $fping != "$2" ]] && [[ -z $(echo $p135 | grep "Successful connections: 1") ]] || [[ $fping == "$2" ]] && [[ -z $(echo $p3389 | grep "Successful connections: 1") ]];then + elif [[ $fping != "$2" ]] && [[ -z $(echo $p135 | grep "Successful connections: 1") ]] || [[ $fping != "$2" ]] && [[ -z $(echo $p3389 | grep "Successful connections: 1") ]];then echo "-------------------Availability----------------------" echo "$2 is not reachable" echo "-----------------------------------------------------" @@ -97,7 +97,7 @@ fi echo "-------------------Availability----------------------" echo "note: this seems to be a windows machine which does not respond to ICMP" echo "-----------------------------------------------------" - elif [[ $fping != "$2" ]] && [[ -z $(echo $p135 | grep "Successful connections: 1") ]] || [[ $fping == "$2" ]] && [[ -z $(echo $p3389 | grep "Successful connections: 1") ]];then + elif [[ $fping != "$2" ]] && [[ -z $(echo $p135 | grep "Successful connections: 1") ]] || [[ $fping != "$2" ]] && [[ -z $(echo $p3389 | grep "Successful connections: 1") ]];then echo "-------------------Availability----------------------" echo "$2 is not reachable" echo "-----------------------------------------------------" @@ -123,7 +123,7 @@ fi echo "-------------------Availability----------------------" echo "note: this seems to be a windows machine which does not respond to ICMP" echo "-----------------------------------------------------" - elif [[ $fping != "$2" ]] && [[ -z $(echo $p135 | grep "Successful connections: 1") ]] || [[ $fping == "$2" ]] && [[ -z $(echo $p3389 | grep "Successful connections: 1") ]];then + elif [[ $fping != "$2" ]] && [[ -z $(echo $p135 | grep "Successful connections: 1") ]] || [[ $fping != "$2" ]] && [[ -z $(echo $p3389 | grep "Successful connections: 1") ]];then echo "-------------------Availability----------------------" echo "$2 is not reachable" echo "-----------------------------------------------------" @@ -154,7 +154,7 @@ fi echo "-------------------Availability----------------------" echo "note: this seems to be a windows machine which does not respond to ICMP" echo "-----------------------------------------------------" - elif [[ $fping != "$2" ]] && [[ -z $(echo $p135 | grep "Successful connections: 1") ]] || [[ $fping == "$2" ]] && [[ -z $(echo $p3389 | grep "Successful connections: 1") ]];then + elif [[ $fping != "$2" ]] && [[ -z $(echo $p135 | grep "Successful connections: 1") ]] || [[ $fping != "$2" ]] && [[ -z $(echo $p3389 | grep "Successful connections: 1") ]];then echo "-------------------Availability----------------------" echo "$2 is not reachable" echo "-----------------------------------------------------" @@ -249,6 +249,7 @@ fi echo "note: this machine seems to be in the rescue system" notify-send "$2 is now reachable" "and seems to be in the rescue system" -u normal -t 30000 -a conn else + echo "$2 is now booted into windows" notify-send "$2 is now booted into windows" -u normal -t 30000 -a conn fi echo "-----------------------------------------------------"