Update ADconnection.sh

This commit is contained in:
PierreGoude 2018-03-21 10:57:23 +01:00 committed by GitHub
parent 3031744a78
commit 7690d756c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -995,7 +995,9 @@ LEFT=$(sudo realm discover | grep configured | awk '{print $2}')
DOMAIN=$(realm discover | grep -i realm.name | awk '{print $2}')
if [ "$LEFT" = "no" ]
then
echo ""
echo "$DOMAIN has not been configured"
echo ""
exit
fi
read -p "Do you really want to leave the domain: $DOMAIN (y/n)?" yn
@ -1003,6 +1005,7 @@ read -p "Do you really want to leave the domain: $DOMAIN (y/n)?" yn
[Yy]* ) echo "Listing domain"
sudo realm discover $DOMAIN
sudo realm leave $DOMAIN
LEFT=$(sudo realm discover | grep configured | awk '{print $2}')
if [ "$LEFT" = "no" ]
then
echo ""