add run as root check

This commit is contained in:
Luis Guzmán 2023-11-29 02:36:57 -06:00
parent 45958c8206
commit 71192f8732
1 changed files with 6 additions and 0 deletions

View File

@ -73,6 +73,12 @@ while [ $secs -gt 0 ]; do
done
}
#Check if user is root
if ! [ "$(id -u)" = 0 ]; then
echo "You need to be root or have sudo privileges!"
exit 0
fi
# Test RAM size (4GB min) + CPUs (min 2)
#Check system resources
printf "\n\nVerifying System Resources:"