mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-06 04:09:40 -06:00
make sure services have some time to deregister
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -54,6 +54,13 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
}
|
||||
}
|
||||
|
||||
// make sure the run group executes all interrupt handlers when the context is canceled
|
||||
gr.Add(func() error {
|
||||
<-ctx.Done()
|
||||
return nil
|
||||
}, func(_ error) {
|
||||
})
|
||||
|
||||
gr.Add(func() error {
|
||||
pidFile := path.Join(os.TempDir(), "revad-"+cfg.Service.Name+"-"+uuid.Must(uuid.NewV4()).String()+".pid")
|
||||
rCfg := revaconfig.UsersConfigFromStruct(cfg)
|
||||
|
||||
Reference in New Issue
Block a user