Browse Source

Fix #539 - replacing [[ with [ to remain POSIX-compliant

madlohe 5 years ago
parent
commit
c741ac893f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      plugins-scripts/check_log.sh

+ 1 - 1
plugins-scripts/check_log.sh

@@ -215,7 +215,7 @@ diff "$logfile" "$oldlog" | grep -v "^>" > "$tempdiff"
 
 
 # Count the number of matching log entries we have and handle errors when grep fails
 # Count the number of matching log entries we have and handle errors when grep fails
 count=$(grep -c "$query" "$tempdiff" 2>&1)
 count=$(grep -c "$query" "$tempdiff" 2>&1)
-if [[ $? -gt 1 ]];then
+if [ $? -gt 1 ];then
     echo "Log check error: $count"
     echo "Log check error: $count"
     exit "$STATE_UNKNOWN"
     exit "$STATE_UNKNOWN"
 fi
 fi