From 749dad9b4b1e094126a9fccb98bd957c159061a8 Mon Sep 17 00:00:00 2001 From: Nils <32552517+byReqz@users.noreply.github.com> Date: Fri, 15 Jan 2021 15:00:32 +0000 Subject: [PATCH] adding multi-ip mode --- conn.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/conn.sh b/conn.sh index 20b2941..545f885 100644 --- a/conn.sh +++ b/conn.sh @@ -2,11 +2,18 @@ if [[ -z "$1" ]]; then echo "Usage: conn [ip] (y/n)" exit +elif [[ "$2" != p ]]; then + echo "multi-ip mode detected, only checking availability" + echo "" + echo "-------------------Availability----------------------" + fping "$@" + echo "-----------------------------------------------------" + exit elif [[ -n "$1" ]]; then echo "checking connection status for $1" - echo "-----------------------------------------" + echo "-------------------Availability----------------------" fping $1 - echo "-----------------------------------------" + echo "-----------------------------------------------------" fi if [[ -z "$2" ]]; then echo "portscan? (y/n)" @@ -28,4 +35,4 @@ elif [[ "$2" = "y" ]]; then exit elif [[ "$2" = "n" ]]; then exit -fi \ No newline at end of file +fi