login-validator: Fix not reloading issue
This commit is contained in:
parent
0bceec2023
commit
afed114190
@ -100,7 +100,7 @@ func main() {
|
||||
|
||||
log.Println("Registering handlers...")
|
||||
mux := http.NewServeMux()
|
||||
mux.Handle("/login", lc)
|
||||
mux.Handle("/login", &lc)
|
||||
mux.HandleFunc("/logout", logout)
|
||||
mux.HandleFunc("/passwd", passwd)
|
||||
http.HandleFunc("/", mux.ServeHTTP)
|
||||
@ -119,6 +119,8 @@ mloop:
|
||||
log.Println("Reloading students files...")
|
||||
if lc.students, err = readStudentsList(studentsFile); err != nil {
|
||||
log.Println("Error during students.csv reload:", err)
|
||||
} else {
|
||||
log.Printf("Students reloaded: %d students allowed to login", len(lc.students))
|
||||
}
|
||||
case syscall.SIGTERM, syscall.SIGINT:
|
||||
break mloop
|
||||
|
Reference in New Issue
Block a user