From 9c12e3d800a49968fb78264c5986b91bebf68dc3 Mon Sep 17 00:00:00 2001 From: Korbs Date: Wed, 19 Jun 2024 19:51:12 -0400 Subject: [PATCH] Use custom environment variables for CPU information --- agent.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent.sh b/agent.sh index 25ca130..ec5bbc2 100644 --- a/agent.sh +++ b/agent.sh @@ -99,8 +99,8 @@ i*86) esac # CPU details -cpu_name=$(prep "$(cat /proc/cpuinfo | grep 'model name' | awk -F\: '{ print $2 }')") -cpu_cores=$(prep "$(($(cat /proc/cpuinfo | grep 'model name' | awk -F\: '{ print $2 }' | sed -e :a -e '$!N;s/\n/\|/;ta' | tr -cd \| | wc -c)+1))") +cpu_name=$(env | grep CPU_NAME | grep -oe '[^=]*$'); +cpu_cores=$(env | grep CPU_CORE | grep -oe '[^=]*$'); if [ -z "$cpu_name" ] then