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
DATE=`date +%H:%M` fi
MENU_FN 2>&1 | sudo tee adconnection.log shift
exit ;;
else -l)
if [ "$1" = "-j" ] shift
then if test $# -gt 0; then
sudo realm join -v -U $2 $3 --install=/ DATE=`date +%H:%M`
exit MENU_FN 2>&1 | sudo tee adconnection.log
else else
if [ "$1" = "-s" ] echo ""
then exit 1
sudo realm discover fi
exit shift
else ;;
if [ "$1" = "-o" ]
then -j)
shift
if test $# -gt 0; then
sudo realm join -v -U $2 $3 --install=/
exit
else
echo ""
exit 1
fi
shift
;;
-s)
shift
if test $# -gt 0; then
sudo realm discover
exit
else
echo ""
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}' )
@ -1167,12 +1191,15 @@ if [ $? -ne 0 ]; then
exit exit
fi fi
fi_auth fi_auth
else else
echo "" echo ""
fi exit 1
fi fi
fi shift
fi ;;
fi *)
fi break
;;
esac
done
MENU_FN MENU_FN