Update ADconnection.sh

This commit is contained in:
PierreGode 2018-05-22 14:00:34 +02:00 committed by GitHub
parent 6926070b70
commit f19c509511
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1022,34 +1022,48 @@ 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" ] if test $# -gt 0; then
then
linuxclientdebug linuxclientdebug
else else
if [ "$1" = "-l" ] echo ""
then exit 1
fi
;;
-l)
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
;;
-j)
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
;;
-s)
if test $# -gt 0; then
sudo realm discover sudo realm discover
exit exit
else else
if [ "$1" = "-o" ] echo ""
then exit 1
fi
;;
-o)
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}' )
@ -1167,12 +1181,14 @@ if [ $? -ne 0 ]; then
exit exit
fi fi
fi_auth fi_auth
else else
echo "" echo ""
fi exit 1
fi fi
fi ;;
fi *)
fi break
fi ;;
esac
done
MENU_FN MENU_FN