Files
opencloud/services/groups/cmd/groups/main.go
Jörn Friedrich Dreyer 066c4b8173 only register signal handling once
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-07-29 16:28:13 +02:00

20 lines
432 B
Go

package main
import (
"context"
"os"
"os/signal"
"syscall"
"github.com/owncloud/ocis/v2/services/groups/pkg/command"
"github.com/owncloud/ocis/v2/services/groups/pkg/config/defaults"
)
func main() {
cfg := defaults.DefaultConfig()
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
if err := command.Execute(cfg); err != nil {
os.Exit(1)
}
}