Update ADconnection.sh

This commit is contained in:
PierreGode 2018-03-27 09:26:37 +02:00 committed by GitHub
parent 3bb73cd00b
commit 13543beea8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -219,28 +219,30 @@ linuxclient
} }
################################## Join for linux clients ########################################## ################################## Join for linux clients ##########################################
linuxclient(){ linuxclient(){
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 )
if [ $? = 0 ]
then
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}' )
if [ "$desktop" = "desktop" ]
then
if [ "$rasp" = "Raspbian" ] if [ "$rasp" = "Raspbian" ]
then then
echo "${INTRO_TEXT}"Detecting Raspberry Pi"${END}" echo "${INTRO_TEXT}"Detecting Raspberry Pi"${END}"
raspberry raspberry
else else
kalilinux=$( lsb_release -a | grep -i Distributor | awk '{print $3}' )
if [ "$kalilinux" = "Kali" ] if [ "$kalilinux" = "Kali" ]
then then
echo "${INTRO_TEXT}"Detecting Kali linux"${END}" echo "${INTRO_TEXT}"Detecting Kali linux"${END}"
kalijoin kalijoin
else else
echo ""
fi
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
fi
fi
export HOSTNAME export HOSTNAME
myhost=$( hostname ) myhost=$( hostname )
clear clear