From b596bb014a4fa34dd2ce939f8895c2ce9ce212d8 Mon Sep 17 00:00:00 2001 From: Nils <32552517+byReqz@users.noreply.github.com> Date: Mon, 1 Feb 2021 13:09:47 +0000 Subject: [PATCH] fixes --- conn.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 "-----------------------------------------------------"