This commit is contained in:
nemunaire 2021-02-13 18:34:44 +01:00
commit 2f4cc04db2
7 changed files with 30 additions and 29 deletions

View file

@ -51,10 +51,10 @@ func main() {
if auth != nil && *auth == "ldap" {
log.Printf("Auth method: LDAP(%s@%s:%d?%s)", *ldapbindusername, *ldapAddr, *ldapPort, *ldapbase)
lc.authMethod = LDAPAuth{
Addr: *ldapAddr,
Port: *ldapPort,
IsTLS: *ldaptls,
Base: *ldapbase,
Addr: *ldapAddr,
Port: *ldapPort,
IsTLS: *ldaptls,
Base: *ldapbase,
BindUsername: *ldapbindusername,
BindPassword: *ldapbindpassword,
}
@ -105,7 +105,8 @@ func main() {
log.Println(fmt.Sprintf("Ready, listening on %s", *bind))
// Wait shutdown signal
mloop: for {
mloop:
for {
switch <-interrupt {
case syscall.SIGHUP:
log.Println("Reloading students files...")
@ -113,7 +114,7 @@ func main() {
log.Println("Error during students.csv reload:", err)
}
case syscall.SIGTERM, syscall.SIGINT:
break mloop;
break mloop
}
}