-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct backend cleanup and return code (#268)
The backend cleanup was only called from the signal handler, defer was ignored. Now there's proper messages and return codes time="03-05-2023 12:43:02" level=info msg="6987 decisions added" time="03-05-2023 12:43:10" level=info msg="Shutting down backend" time="03-05-2023 12:43:10" level=info msg="removing 'crowdsec' table" time="03-05-2023 12:43:10" level=info msg="removing 'crowdsec6' table" time="03-05-2023 12:43:10" level=fatal msg="process terminating with error: received SIGTERM"
- Loading branch information
Showing
2 changed files
with
31 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
package main | ||
|
||
import "github.com/crowdsecurity/cs-firewall-bouncer/cmd" | ||
import ( | ||
log "github.com/sirupsen/logrus" | ||
|
||
"github.com/crowdsecurity/cs-firewall-bouncer/cmd" | ||
) | ||
|
||
func main() { | ||
cmd.Execute() | ||
err := cmd.Execute() | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
} |