From 537bc9d28f61e7b6971368b546c1814bc0420a8d Mon Sep 17 00:00:00 2001 From: root Date: Sat, 19 May 2018 23:07:17 +0200 Subject: [PATCH] Added flag options see: sudo sh ADconnection.sh --help --- ADconnection.sh | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/ADconnection.sh b/ADconnection.sh index 4b71bf6..e446925 100644 --- a/ADconnection.sh +++ b/ADconnection.sh @@ -943,7 +943,8 @@ echo "" echo "" echo "AD-Connection flags" echo "-d ubuntu debug mode GNU required" -echo "-l Run script and log to logfile" +echo "-l Run script and log to logfile" +echo "-j Simple direct join: sh ADconnection.sh -j admin domain" echo "" exit } @@ -1025,20 +1026,23 @@ clear readmes exit else -if [ "$1" = "-d" ] -then -linuxclientdebug -else -if [ "$1" = "-l" ] -then -DATE=`date +%H:%M` -MENU_FN 2>&1 | sudo tee ADconnection.log -exit -else -echo "incorrect flag, see --help for help" -echo "" -echo "" -exit + if [ "$1" = "-d" ] + then + linuxclientdebug + else + if [ "$1" = "-l" ] + then + DATE=`date +%H:%M` + MENU_FN 2>&1 | sudo tee ADconnection.log + exit + else + if [ "$1" = "-j" ] + then + sudo realm join -v -U $2 $3 --install=/ + exit + else + echo "" +fi fi fi fi