Update ADconnection.sh

This commit is contained in:
PierreGode 2018-08-20 15:00:13 +02:00 committed by GitHub
parent a3a888bcb2
commit 20553f6688
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -416,6 +416,7 @@ TheOS=$( hostnamectl | grep -i Operating | awk '{print $3}' ) < /dev/null > /dev
MintOS=$( hostnamectl | grep -i Operating | awk '{print $4}' ) < /dev/null > /dev/null 2>&1 MintOS=$( hostnamectl | grep -i Operating | awk '{print $4}' ) < /dev/null > /dev/null 2>&1
rasp=$( lsb_release -a | grep -i Distributor | awk '{print $3}' ) < /dev/null > /dev/null 2>&1 rasp=$( lsb_release -a | grep -i Distributor | awk '{print $3}' ) < /dev/null > /dev/null 2>&1
kalilinux=$( lsb_release -a | grep -i Distributor | awk '{print $3}' ) < /dev/null > /dev/null 2>&1 kalilinux=$( lsb_release -a | grep -i Distributor | awk '{print $3}' ) < /dev/null > /dev/null 2>&1
Arm=$( sudo hostnamectl | grep Architecture | awk '{print $2}' )
#### OS detection #### #### OS detection ####
if [ "$TheOS" = "Fedora" ] < /dev/null > /dev/null 2>&1 if [ "$TheOS" = "Fedora" ] < /dev/null > /dev/null 2>&1
@ -438,12 +439,21 @@ then
echo "Ubuntu detected" echo "Ubuntu detected"
echo "" echo ""
echo "Checking if it is a Desktop or server" echo "Checking if it is a Desktop or server"
desktop=$( sudo apt list --installed | grep -i desktop | grep -i ubuntu | cut -d '-' -f1 | grep -i desktop | head -1 | awk '{print$1}' ) < /dev/null > /dev/null 2>&1 desktop=$( sudo apt list --installed | grep -i desktop | grep -i ubuntu | cut -d '-' -f1 | grep -i desktop | head -1 | awk '{print$1}' ) < /dev/null > /dev/null 2>&1
if [ "$desktop" = "desktop" ] < /dev/null > /dev/null 2>&1 if [ "$desktop" = "desktop" ] < /dev/null > /dev/null 2>&1
then then
echo "Ubuntu Desktop detected" echo "Ubuntu Desktop detected"
#UbuntU
if [ "$Arm" = "arm" ]
then
sudo sh -c "echo 'greeter-show-manual-login=true' | sudo tee -a /usr/share/lightdm/lightdm.conf.d/50-ubuntu-mate.conf"
sudo sh -c "echo 'allow-guest=false' | sudo tee -a /usr/share/lightdm/lightdm.conf.d/50-ubuntu-mate.conf"
UbuntU UbuntU
else else
UbuntU
fi
else
echo " this seems to be a server, swithching to server mode" echo " this seems to be a server, swithching to server mode"
ubuntuserver14 ubuntuserver14
fi fi