work on signals

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2024-07-24 13:21:30 +02:00
parent 06cc70f978
commit d6045a74ea
7 changed files with 28 additions and 24 deletions
+5 -1
View File
@@ -1,7 +1,10 @@
package command
import (
"context"
"os"
"os/signal"
"syscall"
"github.com/owncloud/ocis/v2/ocis-pkg/clihelper"
"github.com/owncloud/ocis/v2/ocis-pkg/config"
@@ -25,5 +28,6 @@ func Execute() error {
)
}
return app.Run(os.Args)
ctx, _ := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
return app.RunContext(ctx, os.Args)
}