Update helk_update.sh

I updated the Available Memory variable
keyword-vs-text-changes
Roberto Rodriguez 2018-07-12 00:55:53 -04:00 committed by GitHub
parent bd7df68b59
commit 47edded450
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ check_min_requirements(){
systemKernel="$(uname -s)"
echo "[HELK-UPDATE-INFO] HELK being hosted on a $systemKernel box"
if [ "$systemKernel" == "Linux" ]; then
AVAILABLE_MEMORY=$(free -hm | awk 'NR==2{printf "%.f\t\t", $7 }')
AVAILABLE_MEMORY=$(awk '/MemAvailable/{printf "%.f", $2/1024/1024}' /proc/meminfo)
# Only checking Available Memory requirements and not Disk, as old images are deleted and replaced with updated ones.
if [ "${AVAILABLE_MEMORY}" -ge "12" ] ; then
@ -102,4 +102,4 @@ if [ $REBUILD_NEEDED == 1 ]; then
echo -e "[HELK-UPDATE-INFO] YOUR HELK HAS BEEN UPDATED!"
else
echo -e "[HELK-UPDATE-INFO] YOUR HELK IS ALREADY UP-TO-DATE."
fi
fi