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 echo ""
if [ "$1" = "-l" ] exit 1
then fi
DATE=`date +%H:%M` ;;
MENU_FN 2>&1 | sudo tee adconnection.log -l)
exit if test $? -gt 0; then
else DATE=`date +%H:%M`
if [ "$1" = "-j" ] MENU_FN 2>&1 | sudo tee adconnection.log
then else
sudo realm join -v -U $2 $3 --install=/ echo ""
exit exit 1
else fi
if [ "$1" = "-s" ] ;;
then -j)
sudo realm discover if test $# -gt 0; then
exit sudo realm join -v -U $2 $3 --install=/
else exit
if [ "$1" = "-o" ] else
then echo ""
exit 1
fi
;;
-s)
if test $# -gt 0; then
sudo realm discover
exit
else
echo ""
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