From 50527c5366a439075fb14ea33d6a1806cb95b999 Mon Sep 17 00:00:00 2001 From: Enrico Ludwig Date: Sat, 3 Feb 2024 21:37:42 +0100 Subject: [PATCH] Fixed OS detection not working --- agent2_autoinstall.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent2_autoinstall.sh b/agent2_autoinstall.sh index c8437bf..fc57300 100755 --- a/agent2_autoinstall.sh +++ b/agent2_autoinstall.sh @@ -5,8 +5,8 @@ ZABBIX_SERVER_IP="192.168.8.41" LOG_FILE="za2ai.log" # Detect the operating system and version -OS=$(awk -F= '/^NAME/{print $2}' /etc/os-release) -VERSION=$(awk -F= '/^VERSION_ID/{print $2}' /etc/os-release) +OS=$(awk -F= '/^NAME/{print $2}' /etc/os-release | tr -d '"') +VERSION=$(awk -F= '/^VERSION_ID/{print $2}' /etc/os-release | tr -d '"') # Log functions _info() {