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() {