add ram check

This commit is contained in:
wh1te909 2022-12-03 08:14:53 +00:00
parent 2526fa3c47
commit dacedf4018
2 changed files with 13 additions and 1 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
SCRIPT_VERSION="70" SCRIPT_VERSION="71"
SCRIPT_URL='https://raw.githubusercontent.com/amidaware/tacticalrmm/master/install.sh' SCRIPT_URL='https://raw.githubusercontent.com/amidaware/tacticalrmm/master/install.sh'
sudo apt install -y curl wget dirmngr gnupg lsb-release sudo apt install -y curl wget dirmngr gnupg lsb-release
@ -35,6 +35,12 @@ if [ "$arch" != "x86_64" ]; then
exit 1 exit 1
fi fi
memTotal=$(grep -i memtotal /proc/meminfo | awk '{print $2}')
if [[ $memTotal -lt 3627528 ]]; then
echo -ne "${RED}ERROR: A minimum of 4GB of RAM is required.${NC}\n"
exit 1
fi
osname=$(lsb_release -si); osname=${osname^} osname=$(lsb_release -si); osname=${osname^}
osname=$(echo "$osname" | tr '[A-Z]' '[a-z]') osname=$(echo "$osname" | tr '[A-Z]' '[a-z]')
fullrel=$(lsb_release -sd) fullrel=$(lsb_release -sd)

View File

@ -35,6 +35,12 @@ if [ "$arch" != "x86_64" ]; then
exit 1 exit 1
fi fi
memTotal=$(grep -i memtotal /proc/meminfo | awk '{print $2}')
if [[ $memTotal -lt 3627528 ]]; then
echo -ne "${RED}ERROR: A minimum of 4GB of RAM is required.${NC}\n"
exit 1
fi
osname=$(lsb_release -si); osname=${osname^} osname=$(lsb_release -si); osname=${osname^}
osname=$(echo "$osname" | tr '[A-Z]' '[a-z]') osname=$(echo "$osname" | tr '[A-Z]' '[a-z]')
fullrel=$(lsb_release -sd) fullrel=$(lsb_release -sd)