mirror of
https://github.com/byReqz/conn.git
synced 2024-11-01 01:03:14 +00:00
adding multi-ip mode
This commit is contained in:
parent
d4823429a2
commit
749dad9b4b
13
conn.sh
13
conn.sh
@ -2,11 +2,18 @@
|
|||||||
if [[ -z "$1" ]]; then
|
if [[ -z "$1" ]]; then
|
||||||
echo "Usage: conn [ip] (y/n)"
|
echo "Usage: conn [ip] (y/n)"
|
||||||
exit
|
exit
|
||||||
|
elif [[ "$2" != p ]]; then
|
||||||
|
echo "multi-ip mode detected, only checking availability"
|
||||||
|
echo ""
|
||||||
|
echo "-------------------Availability----------------------"
|
||||||
|
fping "$@"
|
||||||
|
echo "-----------------------------------------------------"
|
||||||
|
exit
|
||||||
elif [[ -n "$1" ]]; then
|
elif [[ -n "$1" ]]; then
|
||||||
echo "checking connection status for $1"
|
echo "checking connection status for $1"
|
||||||
echo "-----------------------------------------"
|
echo "-------------------Availability----------------------"
|
||||||
fping $1
|
fping $1
|
||||||
echo "-----------------------------------------"
|
echo "-----------------------------------------------------"
|
||||||
fi
|
fi
|
||||||
if [[ -z "$2" ]]; then
|
if [[ -z "$2" ]]; then
|
||||||
echo "portscan? (y/n)"
|
echo "portscan? (y/n)"
|
||||||
@ -28,4 +35,4 @@ elif [[ "$2" = "y" ]]; then
|
|||||||
exit
|
exit
|
||||||
elif [[ "$2" = "n" ]]; then
|
elif [[ "$2" = "n" ]]; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user