mirror of
https://github.com/byReqz/conn.git
synced 2024-11-22 09:01:15 +00:00
change notification time to 30 seconds
This commit is contained in:
parent
1c7b82a248
commit
a0705733ae
14
conn.sh
14
conn.sh
@ -197,7 +197,7 @@ fi
|
|||||||
if [[ $fping != "$2" ]] && [[ -n $(echo $p135 | grep "Successful connections: 1") ]] || [[ $fping != "$2" ]] && [[ -n $(echo $p3389 | grep "Successful connections: 1") ]] || [[ $fping = "$2" ]] && [[ -n $(echo $p135 | grep "Successful connections: 1") ]];then
|
if [[ $fping != "$2" ]] && [[ -n $(echo $p135 | grep "Successful connections: 1") ]] || [[ $fping != "$2" ]] && [[ -n $(echo $p3389 | grep "Successful connections: 1") ]] || [[ $fping = "$2" ]] && [[ -n $(echo $p135 | grep "Successful connections: 1") ]];then
|
||||||
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"
|
||||||
notify-send "$2 is now reachable" "and seems to be a windows machine" -u normal -t 15000 -a conn
|
notify-send "$2 is now reachable" "and seems to be a windows machine" -u normal -t 30000 -a conn
|
||||||
echo "-----------------------------------------------------"
|
echo "-----------------------------------------------------"
|
||||||
else
|
else
|
||||||
while [[ "$(fping -m -q -u $2)" == "$2" ]]; do :
|
while [[ "$(fping -m -q -u $2)" == "$2" ]]; do :
|
||||||
@ -207,12 +207,12 @@ fi
|
|||||||
rescue=$(nping -q1 -c1 -p22,222 $2)
|
rescue=$(nping -q1 -c1 -p22,222 $2)
|
||||||
if [[ -n $(echo $rescue | grep "Successful connections: 1") ]];then
|
if [[ -n $(echo $rescue | grep "Successful connections: 1") ]];then
|
||||||
echo "note: this seems to be a linux machine"
|
echo "note: this seems to be a linux machine"
|
||||||
notify-send "$2 is now reachable" "and seems to be in a linux system" -u normal -t 15000 -a conn
|
notify-send "$2 is now reachable" "and seems to be in a linux system" -u normal -t 30000 -a conn
|
||||||
elif [[ -n $(echo $rescue | grep "Successful connections: 2") ]];then
|
elif [[ -n $(echo $rescue | grep "Successful connections: 2") ]];then
|
||||||
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 15000 -a conn
|
notify-send "$2 is now reachable" "and seems to be in the rescue system" -u normal -t 30000 -a conn
|
||||||
else
|
else
|
||||||
notify-send "$2 is now reachable" -u normal -t 15000 -a conn
|
notify-send "$2 is now reachable" -u normal -t 30000 -a conn
|
||||||
fi
|
fi
|
||||||
echo "-----------------------------------------------------"
|
echo "-----------------------------------------------------"
|
||||||
fi
|
fi
|
||||||
@ -238,7 +238,7 @@ fi
|
|||||||
if [[ $fping = "$2" ]];then
|
if [[ $fping = "$2" ]];then
|
||||||
echo "-------------------Availability----------------------"
|
echo "-------------------Availability----------------------"
|
||||||
echo "note: this seems to be a unix machine which does respond to ICMP"
|
echo "note: this seems to be a unix machine which does respond to ICMP"
|
||||||
notify-send "$2 is a unix machine" -u normal -t 15000 -a conn
|
notify-send "$2 is a unix machine" -u normal -t 30000 -a conn
|
||||||
echo "-----------------------------------------------------"
|
echo "-----------------------------------------------------"
|
||||||
else
|
else
|
||||||
while [[ -n $(nping -q1 -c1 -p135 $2 | grep "Successful connections: 1") ]]; do :
|
while [[ -n $(nping -q1 -c1 -p135 $2 | grep "Successful connections: 1") ]]; do :
|
||||||
@ -247,9 +247,9 @@ fi
|
|||||||
rescue=$(nping -q1 -c1 -p22,222 $2)
|
rescue=$(nping -q1 -c1 -p22,222 $2)
|
||||||
if [[ -n $(echo $rescue | grep "Successful connections: 2") ]];then
|
if [[ -n $(echo $rescue | grep "Successful connections: 2") ]];then
|
||||||
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 15000 -a conn
|
notify-send "$2 is now reachable" "and seems to be in the rescue system" -u normal -t 30000 -a conn
|
||||||
else
|
else
|
||||||
notify-send "$2 is now booted into windows" -u normal -t 15000 -a conn
|
notify-send "$2 is now booted into windows" -u normal -t 30000 -a conn
|
||||||
fi
|
fi
|
||||||
echo "-----------------------------------------------------"
|
echo "-----------------------------------------------------"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user