From 2317c09a73cf9f64d45f3ee0796aaa50b43c95c3 Mon Sep 17 00:00:00 2001 From: log1-c <24474580+log1-c@users.noreply.github.com> Date: Tue, 27 Jul 2021 15:20:36 +0200 Subject: [PATCH] change output depending on site or computer name --- check.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/check.go b/check.go index 5935376..a5d4b53 100644 --- a/check.go +++ b/check.go @@ -140,9 +140,11 @@ func (c *Config) Run() (rc int, output string, err error) { // Add summary on top output = fmt.Sprintf("%d threats found, %d not mitigated\n", total, notMitigated) + output - if c.SiteName != "" { + if (c.SiteName != "" && c.ComputerName == "") { output = fmt.Sprintf("site %s - ", c.SiteName) + output - } + } else if (c.ComputerName != ""){ + output = fmt.Sprintf("Computer %s - ", c.ComputerName) + output + } // Add perfdata output += "|"