This commit fixes #2198 by ensuring that a comma is added before "service" finding if $FIRST_FINDING is false.
This commit is contained in:
David Cooper 2022-06-24 10:17:51 -04:00
parent 730c758488
commit 4dae3895e4

View File

@ -1233,6 +1233,8 @@ fileout_json_finding() {
if [[ "$1" == service ]]; then if [[ "$1" == service ]]; then
if [[ $SERVER_COUNTER -gt 1 ]]; then if [[ $SERVER_COUNTER -gt 1 ]]; then
echo " ," >> "$JSONFILE" echo " ," >> "$JSONFILE"
elif ! "$FIRST_FINDING"; then
echo -n "," >> "$JSONFILE"
fi fi
target="$NODE" target="$NODE"
$do_mx_all_ips && target="$URI" $do_mx_all_ips && target="$URI"