From 5b553ba8fd7fa76a1b8ebf9323d023f2705624d7 Mon Sep 17 00:00:00 2001 From: bckelley Date: Fri, 24 May 2024 10:37:16 -0500 Subject: [PATCH] delete check_root -> added to checkEnv --- setup.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index 00c47c8..6f8b42b 100755 --- a/setup.sh +++ b/setup.sh @@ -9,14 +9,13 @@ command_exists() { command -v "$1" >/dev/null 2>&1 } -check_root() { +checkEnv() { + if [ "$(id -u)" != "0" ]; then echo -e "${RED}This script must be run as root.${RC}" 1>&2 exit 1 fi -} -checkEnv() { ## Check for requirements. REQUIREMENTS='curl groups sudo' for req in ${REQUIREMENTS}; do