1
0
mirror of https://github.com/byReqz/conn.git synced 2024-11-24 17:54:55 +00:00
This commit is contained in:
Nils 2021-02-01 13:09:47 +00:00 committed by GitHub
parent 116682dec3
commit b596bb014a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,7 +68,7 @@ fi
echo "-------------------Availability----------------------" echo "-------------------Availability----------------------"
echo "note: this seems to be a windows machine which does not respond to ICMP" echo "note: this seems to be a windows machine which does not respond to ICMP"
echo "-----------------------------------------------------" 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 "-------------------Availability----------------------"
echo "$2 is not reachable" echo "$2 is not reachable"
echo "-----------------------------------------------------" echo "-----------------------------------------------------"
@ -97,7 +97,7 @@ fi
echo "-------------------Availability----------------------" echo "-------------------Availability----------------------"
echo "note: this seems to be a windows machine which does not respond to ICMP" echo "note: this seems to be a windows machine which does not respond to ICMP"
echo "-----------------------------------------------------" 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 "-------------------Availability----------------------"
echo "$2 is not reachable" echo "$2 is not reachable"
echo "-----------------------------------------------------" echo "-----------------------------------------------------"
@ -123,7 +123,7 @@ fi
echo "-------------------Availability----------------------" echo "-------------------Availability----------------------"
echo "note: this seems to be a windows machine which does not respond to ICMP" echo "note: this seems to be a windows machine which does not respond to ICMP"
echo "-----------------------------------------------------" 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 "-------------------Availability----------------------"
echo "$2 is not reachable" echo "$2 is not reachable"
echo "-----------------------------------------------------" echo "-----------------------------------------------------"
@ -154,7 +154,7 @@ fi
echo "-------------------Availability----------------------" echo "-------------------Availability----------------------"
echo "note: this seems to be a windows machine which does not respond to ICMP" echo "note: this seems to be a windows machine which does not respond to ICMP"
echo "-----------------------------------------------------" 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 "-------------------Availability----------------------"
echo "$2 is not reachable" echo "$2 is not reachable"
echo "-----------------------------------------------------" echo "-----------------------------------------------------"
@ -249,6 +249,7 @@ fi
echo "note: this machine seems to be in the rescue system" 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 notify-send "$2 is now reachable" "and seems to be in the rescue system" -u normal -t 30000 -a conn
else else
echo "$2 is now booted into windows"
notify-send "$2 is now booted into windows" -u normal -t 30000 -a conn notify-send "$2 is now booted into windows" -u normal -t 30000 -a conn
fi fi
echo "-----------------------------------------------------" echo "-----------------------------------------------------"