diff --git a/custom.go b/custom.go index 5b1a05b..bfdc76a 100644 --- a/custom.go +++ b/custom.go @@ -54,6 +54,7 @@ func (c *customBouncer) Delete(decision *models.Decision) error { if err != nil { log.Warningf("serialize: %s", err) } + log.Printf("custom [%s] : del ban on %s for %s sec (%s)", c.path, *decision.Value, strconv.Itoa(int(banDuration.Seconds())), *decision.Scenario) cmd := exec.Command(c.path, "del", *decision.Value, strconv.Itoa(int(banDuration.Seconds())), *decision.Scenario, str) if out, err := cmd.CombinedOutput(); err != nil { log.Infof("Error in 'del' command (%s): %v --> %s", cmd.String(), err, string(out)) diff --git a/main.go b/main.go index 6dd509c..80847a4 100644 --- a/main.go +++ b/main.go @@ -5,7 +5,6 @@ import ( "fmt" "os" "os/signal" - "strings" "syscall" "github.com/coreos/go-systemd/daemon" @@ -107,9 +106,7 @@ func main() { log.Infof("deleting '%d' decisions", len(decisions.Deleted)) for _, decision := range decisions.Deleted { if err := custom.Delete(decision); err != nil { - if !strings.Contains(err.Error(), "netlink receive: no such file or directory") { - log.Errorf("unable to delete decision for '%s': %s", *decision.Value, err) - } + log.Errorf("unable to delete decision for '%s': %s", *decision.Value, err) } else { log.Debugf("deleted '%s'", *decision.Value) }