made stop a bool channel
the build was successful
Details
the build was successful
Details
This commit is contained in:
parent
ba47e39bfe
commit
d0679ce785
6
main.go
6
main.go
|
@ -49,15 +49,15 @@ func main() {
|
|||
to redistribute it under certain conditions
|
||||
=================================================`)
|
||||
|
||||
stop := make(chan int)
|
||||
stop := make(chan bool)
|
||||
go processing.RunAirodumpNG(stop)
|
||||
|
||||
go processing.UpdateActiveClients()
|
||||
|
||||
for exit := range stop {
|
||||
if exit == 0 {
|
||||
if !exit {
|
||||
continue
|
||||
}
|
||||
os.Exit(exit)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,10 +24,10 @@ import (
|
|||
)
|
||||
|
||||
// RunAirodumpNG does what it says
|
||||
func RunAirodumpNG(stop chan int) {
|
||||
func RunAirodumpNG(stop chan bool) {
|
||||
err := exec.Command("/bin/bash", []string{"-c", "airodump-ng " + config.WifiInterface + " -w " + config.CSVDumps + "/dump --output-format csv"}...).Run()
|
||||
if err != nil {
|
||||
log.Println("Could not run airodump-ng. Please make sure it is installed and you have sufficient permissions. ", err)
|
||||
stop <- 1
|
||||
stop <- true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue