From 93f4248f0ea6073c7c0865b181297f300db0b038 Mon Sep 17 00:00:00 2001 From: "Gaunt, John" Date: Sun, 7 Jan 2018 21:01:59 -0500 Subject: [PATCH] Update domainjoin.sh --- domainjoin.sh | 5 +++++ 1 file changed, 5 insertions(+) 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