From 801d42ed20698c7fcce30a030028a8f72f062797 Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Tue, 23 Nov 2021 14:51:06 -0500 Subject: [PATCH] Correct if check to inline the command instead of checking for emptiness of a variable --- salt/common/tools/sbin/soup | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index 2aefc67bb..fc6694ec2 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -841,8 +841,7 @@ apply_hotfix() { if [[ "$INSTALLEDVERSION" == "2.3.90" && "$HOTFIXVERSION" == "WAZUH" ]] ; then FILE="/nsm/wazuh/etc/ossec.conf" echo "Detecting if ossec.conf needs corrected..." - WAZUHHEADER=$(head -1 $FILE | grep "xml version") - if [[ ! -z "$WAZUHHEADER" ]]; then + if head -1 $FILE | grep "xml version"; then echo "$FILE has an XML header; removing" sed -i 1d $FILE so-wazuh-restart