Add exclude-listeners parameter

This commit is contained in:
Julien Riou 2018-07-08 23:48:48 +02:00
parent ebc48e3615
commit c0382eaad9
No known key found for this signature in database
GPG key ID: BA3E15176E45E85D
10 changed files with 47 additions and 22 deletions

View file

@ -47,6 +47,7 @@ func main() {
flag.StringVar(&config.IncludeUsersRegex, "include-users-regex", "", "Terminate users matching this regexp")
flag.Var(&config.ExcludeUsers, "exclude-user", "Ignore this user (can be called multiple times)")
flag.StringVar(&config.ExcludeUsersRegex, "exclude-users-regex", "", "Ignore users matching this regexp")
flag.BoolVar(&config.ExcludeListeners, "exclude-listeners", false, "Ignore sessions listening for events")
flag.BoolVar(&config.Cancel, "cancel", false, "Cancel sessions instead of terminate")
flag.Parse()
@ -107,7 +108,7 @@ func main() {
}
done := make(chan bool)
sessions := make(chan base.Session)
sessions := make(chan *base.Session)
ctx := base.NewContext(config, sessions, done)
terminator := terminator.NewTerminator(ctx)