From 47edded450b0cb1bdae2364a914fb3a31a1c2679 Mon Sep 17 00:00:00 2001 From: Roberto Rodriguez Date: Thu, 12 Jul 2018 00:55:53 -0400 Subject: [PATCH] Update helk_update.sh I updated the Available Memory variable --- helk_update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helk_update.sh b/helk_update.sh index 0bac825..afd1dd2 100755 --- a/helk_update.sh +++ b/helk_update.sh @@ -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 \ No newline at end of file +fi