Update ADconnection.sh

This commit is contained in:
PierreGode 2018-05-22 08:13:22 +02:00 committed by GitHub
parent 3c5dc7fb40
commit dddbbf4abf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1022,34 +1022,58 @@ fi
done done
} }
clear clear
if [ "$1" = "--help" ] while test $# -gt 0; do
then case "$1" in
clear -h|--help)
readmes readmes
exit ;;
else -d)
if [ "$1" = "-d" ] shift
then if test $# -gt 0; then
linuxclientdebug linuxclientdebug
else else
if [ "$1" = "-l" ] echo ""
then exit 1
fi
shift
;;
-l)
shift
if test $# -gt 0; then
DATE=`date +%H:%M` DATE=`date +%H:%M`
MENU_FN 2>&1 | sudo tee adconnection.log MENU_FN 2>&1 | sudo tee adconnection.log
exit
else else
if [ "$1" = "-j" ] echo ""
then exit 1
fi
shift
;;
-j)
shift
if test $# -gt 0; then
sudo realm join -v -U $2 $3 --install=/ sudo realm join -v -U $2 $3 --install=/
exit exit
else else
if [ "$1" = "-s" ] echo ""
then exit 1
fi
shift
;;
-s)
shift
if test $# -gt 0; then
sudo realm discover sudo realm discover
exit exit
else else
if [ "$1" = "-o" ] echo ""
then exit 1
fi
shift
;;
-s)
shift
if test $# -gt 0; then
desktop=$( sudo apt list --installed | grep -i desktop | grep -i ubuntu | cut -d '-' -f1 | grep -i desktop ) desktop=$( sudo apt list --installed | grep -i desktop | grep -i ubuntu | cut -d '-' -f1 | grep -i desktop )
rasp=$( lsb_release -a | grep -i Distributor | awk '{print $3}' ) rasp=$( lsb_release -a | grep -i Distributor | awk '{print $3}' )
kalilinux=$( lsb_release -a | grep -i Distributor | awk '{print $3}' ) kalilinux=$( lsb_release -a | grep -i Distributor | awk '{print $3}' )
@ -1169,10 +1193,13 @@ fi
fi_auth fi_auth
else else
echo "" echo ""
exit 1
fi fi
fi shift
fi ;;
fi *)
fi break
fi ;;
esac
done
MENU_FN MENU_FN