diff --git a/domainjoin.sh b/domainjoin.sh index 2f018c9..b1578d1 100644 --- a/domainjoin.sh +++ b/domainjoin.sh @@ -1,5 +1,10 @@ #!/bin/bash +if [[ "$EUID" -ne 0 ]]; then + echo "Please run as root" + exit +fi + if [[ -f /etc/debian_version ]]; then wget -O - http://repo.pbis.beyondtrust.com/apt/RPM-GPG-KEY-pbis|sudo apt-key add - wget -O /etc/apt/sources.list.d/pbiso.list http://repo.pbis.beyondtrust.com/apt/pbiso.list