From 4c0a1e04d2190d488098bc23c734bafec59d2d18 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 20 May 2018 10:38:17 +0200 Subject: [PATCH] Added flag options see: sudo sh ADconnection.sh --help --- ADconnection.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ADconnection.sh b/ADconnection.sh index d2d0896..b922a3e 100644 --- a/ADconnection.sh +++ b/ADconnection.sh @@ -922,6 +922,7 @@ clear echo "Usage: sh ADconnection.sh [--help] [-d (ubuntu debug mode)]" echo " [-j admin domain (Simple direct join)" echo " [-l (script output to log file)]" +echo " [-s (Discover domain)]" echo "" echo"" echo "${INTRO_TEXT} Active directory connection tool ${INTRO_TEXT}" @@ -1040,7 +1041,12 @@ else sudo realm join -v -U $2 $3 --install=/ exit else - echo "" + if [ "$1" = "-s" ] + then + sudo realm discover + else + echo "" +fi fi fi fi