internal: fix outposts not reacting to signals while starting

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-08-05 18:13:09 +02:00
parent ec42d378ab
commit d5703dce39
2 changed files with 14 additions and 4 deletions

View file

@ -52,11 +52,18 @@ func main() {
ex := common.Init()
defer common.Defer()
go func() {
for {
<-ex
os.Exit(0)
}
}()
ac := ak.NewAPIController(*akURLActual, akToken)
if ac == nil {
os.Exit(1)
}
defer ac.Shutdown()
ac.Server = ldap.NewServer(ac)
@ -67,7 +74,5 @@ func main() {
for {
<-ex
ac.Shutdown()
os.Exit(0)
}
}

View file

@ -55,11 +55,18 @@ func main() {
ex := common.Init()
defer common.Defer()
go func() {
for {
<-ex
os.Exit(0)
}
}()
ac := ak.NewAPIController(*akURLActual, akToken)
if ac == nil {
os.Exit(1)
}
defer ac.Shutdown()
ac.Server = proxyv2.NewProxyServer(ac)
@ -70,7 +77,5 @@ func main() {
for {
<-ex
ac.Shutdown()
os.Exit(0)
}
}