diff --git a/.drone.star b/.drone.star index b5fc64186..7b3eb951a 100644 --- a/.drone.star +++ b/.drone.star @@ -2020,7 +2020,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on = "commands": [ "%s init --insecure true" % ocis_bin, "cat $OCIS_CONFIG_DIR/ocis.yaml", - ] + (wrapper_commands if with_wrapper else ["%s server" % ocis_bin]), + ] + (wrapper_commands), "volumes": volumes, "depends_on": depends_on, }, diff --git a/services/app-provider/pkg/command/server.go b/services/app-provider/pkg/command/server.go index a6b26479c..8234b4391 100644 --- a/services/app-provider/pkg/command/server.go +++ b/services/app-provider/pkg/command/server.go @@ -61,6 +61,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) debugServer, err := debug.Server( diff --git a/services/app-registry/pkg/command/server.go b/services/app-registry/pkg/command/server.go index aaab502d6..543eb3f83 100644 --- a/services/app-registry/pkg/command/server.go +++ b/services/app-registry/pkg/command/server.go @@ -60,6 +60,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) debugServer, err := debug.Server( diff --git a/services/audit/pkg/command/server.go b/services/audit/pkg/command/server.go index fe8f270cf..c945ceea7 100644 --- a/services/audit/pkg/command/server.go +++ b/services/audit/pkg/command/server.go @@ -3,6 +3,7 @@ package command import ( "context" "fmt" + "os" "github.com/cs3org/reva/v2/pkg/events" "github.com/cs3org/reva/v2/pkg/events/stream" @@ -59,6 +60,7 @@ func Server(cfg *config.Config) *cli.Command { Err(err). Msg("Shutting down server") cancel() + os.Exit(1) }) { diff --git a/services/auth-basic/pkg/command/server.go b/services/auth-basic/pkg/command/server.go index 2d185a1f0..d7e9f8dff 100644 --- a/services/auth-basic/pkg/command/server.go +++ b/services/auth-basic/pkg/command/server.go @@ -74,6 +74,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) debugServer, err := debug.Server( diff --git a/services/auth-bearer/pkg/command/server.go b/services/auth-bearer/pkg/command/server.go index 354f12899..5646f6399 100644 --- a/services/auth-bearer/pkg/command/server.go +++ b/services/auth-bearer/pkg/command/server.go @@ -61,6 +61,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) debugServer, err := debug.Server( diff --git a/services/auth-machine/pkg/command/server.go b/services/auth-machine/pkg/command/server.go index f3d0a2957..e19fb45f6 100644 --- a/services/auth-machine/pkg/command/server.go +++ b/services/auth-machine/pkg/command/server.go @@ -61,6 +61,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) debugServer, err := debug.Server( diff --git a/services/auth-service/pkg/command/server.go b/services/auth-service/pkg/command/server.go index 21bdeee3b..d656ef42a 100644 --- a/services/auth-service/pkg/command/server.go +++ b/services/auth-service/pkg/command/server.go @@ -56,6 +56,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) debugServer, err := debug.Server( diff --git a/services/clientlog/pkg/command/server.go b/services/clientlog/pkg/command/server.go index 050849c0b..d8399f8ac 100644 --- a/services/clientlog/pkg/command/server.go +++ b/services/clientlog/pkg/command/server.go @@ -3,6 +3,7 @@ package command import ( "context" "fmt" + "os" "github.com/cs3org/reva/v2/pkg/events" "github.com/cs3org/reva/v2/pkg/events/stream" @@ -100,6 +101,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) } diff --git a/services/frontend/pkg/command/server.go b/services/frontend/pkg/command/server.go index 4c93af769..6fdc3a8ec 100644 --- a/services/frontend/pkg/command/server.go +++ b/services/frontend/pkg/command/server.go @@ -65,6 +65,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) debugServer, err := debug.Server( diff --git a/services/gateway/pkg/command/server.go b/services/gateway/pkg/command/server.go index 3d7229acb..ebbc7f7eb 100644 --- a/services/gateway/pkg/command/server.go +++ b/services/gateway/pkg/command/server.go @@ -60,6 +60,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) debugServer, err := debug.Server( diff --git a/services/graph/pkg/command/server.go b/services/graph/pkg/command/server.go index 386916072..2c547aefe 100644 --- a/services/graph/pkg/command/server.go +++ b/services/graph/pkg/command/server.go @@ -3,6 +3,7 @@ package command import ( "context" "fmt" + "os" "github.com/oklog/run" "github.com/owncloud/ocis/v2/ocis-pkg/config/configlog" @@ -68,6 +69,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) } diff --git a/services/groups/pkg/command/server.go b/services/groups/pkg/command/server.go index 6226b9a2b..c1b43bc94 100644 --- a/services/groups/pkg/command/server.go +++ b/services/groups/pkg/command/server.go @@ -74,6 +74,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) debugServer, err := debug.Server( diff --git a/services/idm/pkg/command/server.go b/services/idm/pkg/command/server.go index 4ba21b2a8..048ef8d3b 100644 --- a/services/idm/pkg/command/server.go +++ b/services/idm/pkg/command/server.go @@ -95,6 +95,7 @@ func Server(cfg *config.Config) *cli.Command { Err(err). Msg("Shutting down server") cancel() + os.Exit(1) }) } diff --git a/services/idp/pkg/command/server.go b/services/idp/pkg/command/server.go index b21f26168..48f431f59 100644 --- a/services/idp/pkg/command/server.go +++ b/services/idp/pkg/command/server.go @@ -95,6 +95,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) } diff --git a/services/invitations/pkg/command/server.go b/services/invitations/pkg/command/server.go index b15898769..01000c7d7 100644 --- a/services/invitations/pkg/command/server.go +++ b/services/invitations/pkg/command/server.go @@ -3,6 +3,7 @@ package command import ( "context" "fmt" + "os" "github.com/oklog/run" "github.com/owncloud/ocis/v2/ocis-pkg/config/configlog" @@ -88,6 +89,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) } diff --git a/services/nats/pkg/command/server.go b/services/nats/pkg/command/server.go index 09dc6cb54..e118d4331 100644 --- a/services/nats/pkg/command/server.go +++ b/services/nats/pkg/command/server.go @@ -4,6 +4,7 @@ import ( "context" "crypto/tls" "fmt" + "os" "github.com/oklog/run" @@ -113,6 +114,7 @@ func Server(cfg *config.Config) *cli.Command { natsServer.Shutdown() cancel() + os.Exit(1) }) return gr.Run() diff --git a/services/ocdav/pkg/command/server.go b/services/ocdav/pkg/command/server.go index a5a8d178c..881aabf03 100644 --- a/services/ocdav/pkg/command/server.go +++ b/services/ocdav/pkg/command/server.go @@ -3,6 +3,7 @@ package command import ( "context" "fmt" + "os" "github.com/cs3org/reva/v2/pkg/micro/ocdav" "github.com/cs3org/reva/v2/pkg/sharedconf" @@ -99,6 +100,7 @@ func Server(cfg *config.Config) *cli.Command { Str("server", c.Command.Name). Msg("Shutting down server") cancel() + os.Exit(1) }) debugServer, err := debug.Server( diff --git a/services/ocs/pkg/command/server.go b/services/ocs/pkg/command/server.go index fb37a21f3..c252872ec 100644 --- a/services/ocs/pkg/command/server.go +++ b/services/ocs/pkg/command/server.go @@ -3,6 +3,7 @@ package command import ( "context" "fmt" + "os" "github.com/owncloud/ocis/v2/ocis-pkg/config/configlog" "github.com/owncloud/ocis/v2/ocis-pkg/version" @@ -81,6 +82,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) } diff --git a/services/postprocessing/pkg/command/server.go b/services/postprocessing/pkg/command/server.go index a32716f40..c71b278da 100644 --- a/services/postprocessing/pkg/command/server.go +++ b/services/postprocessing/pkg/command/server.go @@ -86,6 +86,7 @@ func Server(cfg *config.Config) *cli.Command { Err(err). Msg("Shutting down server") cancel() + os.Exit(1) }) } diff --git a/services/proxy/pkg/command/server.go b/services/proxy/pkg/command/server.go index 2421e91a8..be5273837 100644 --- a/services/proxy/pkg/command/server.go +++ b/services/proxy/pkg/command/server.go @@ -6,6 +6,7 @@ import ( "errors" "fmt" "net/http" + "os" "time" "github.com/go-chi/chi/v5" @@ -154,6 +155,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) } diff --git a/services/settings/pkg/command/server.go b/services/settings/pkg/command/server.go index d252f822c..7975ea41c 100644 --- a/services/settings/pkg/command/server.go +++ b/services/settings/pkg/command/server.go @@ -3,6 +3,7 @@ package command import ( "context" "fmt" + "os" "github.com/oklog/run" "github.com/owncloud/ocis/v2/ocis-pkg/config/configlog" @@ -75,6 +76,7 @@ func Server(cfg *config.Config) *cli.Command { servers.Add(httpServer.Run, func(_ error) { logger.Info().Str("server", "http").Msg("Shutting down server") cancel() + os.Exit(1) }) // prepare a gRPC server and add it to the group run. @@ -90,6 +92,7 @@ func Server(cfg *config.Config) *cli.Command { servers.Add(grpcServer.Run, func(_ error) { logger.Info().Str("server", "grpc").Msg("Shutting down server") cancel() + os.Exit(1) }) // prepare a debug server and add it to the group run. diff --git a/services/sharing/pkg/command/server.go b/services/sharing/pkg/command/server.go index 37c01972f..027c16983 100644 --- a/services/sharing/pkg/command/server.go +++ b/services/sharing/pkg/command/server.go @@ -74,6 +74,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) debugServer, err := debug.Server( diff --git a/services/storage-publiclink/pkg/command/server.go b/services/storage-publiclink/pkg/command/server.go index 42a8cbf81..6512252b7 100644 --- a/services/storage-publiclink/pkg/command/server.go +++ b/services/storage-publiclink/pkg/command/server.go @@ -61,6 +61,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) debugServer, err := debug.Server( diff --git a/services/storage-shares/pkg/command/server.go b/services/storage-shares/pkg/command/server.go index 2c3746f06..8af5b1fa3 100644 --- a/services/storage-shares/pkg/command/server.go +++ b/services/storage-shares/pkg/command/server.go @@ -61,6 +61,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) debugServer, err := debug.Server( diff --git a/services/storage-system/pkg/command/server.go b/services/storage-system/pkg/command/server.go index 34577bf08..00618bb9a 100644 --- a/services/storage-system/pkg/command/server.go +++ b/services/storage-system/pkg/command/server.go @@ -61,6 +61,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) debugServer, err := debug.Server( diff --git a/services/storage-users/pkg/command/server.go b/services/storage-users/pkg/command/server.go index e6acbd6f4..cff2261c0 100644 --- a/services/storage-users/pkg/command/server.go +++ b/services/storage-users/pkg/command/server.go @@ -63,6 +63,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) debugServer, err := debug.Server( diff --git a/services/store/pkg/command/server.go b/services/store/pkg/command/server.go index 3d7660347..854bf0e7b 100644 --- a/services/store/pkg/command/server.go +++ b/services/store/pkg/command/server.go @@ -3,6 +3,7 @@ package command import ( "context" "fmt" + "os" "github.com/oklog/run" @@ -75,6 +76,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) } diff --git a/services/thumbnails/pkg/command/server.go b/services/thumbnails/pkg/command/server.go index a18b49e3b..8482fa9e4 100644 --- a/services/thumbnails/pkg/command/server.go +++ b/services/thumbnails/pkg/command/server.go @@ -3,6 +3,7 @@ package command import ( "context" "fmt" + "os" "github.com/oklog/run" "github.com/owncloud/ocis/v2/ocis-pkg/config/configlog" @@ -73,6 +74,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) server, err := debug.Server( diff --git a/services/userlog/pkg/command/server.go b/services/userlog/pkg/command/server.go index 3ec49220c..0498cac5f 100644 --- a/services/userlog/pkg/command/server.go +++ b/services/userlog/pkg/command/server.go @@ -3,6 +3,7 @@ package command import ( "context" "fmt" + "os" "github.com/cs3org/reva/v2/pkg/events" "github.com/cs3org/reva/v2/pkg/events/stream" @@ -144,6 +145,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) } diff --git a/services/users/pkg/command/server.go b/services/users/pkg/command/server.go index 1fa6de1f5..d5894fbb5 100644 --- a/services/users/pkg/command/server.go +++ b/services/users/pkg/command/server.go @@ -74,6 +74,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) debugServer, err := debug.Server( diff --git a/services/web/pkg/command/server.go b/services/web/pkg/command/server.go index 2ec46c31c..c967ece84 100644 --- a/services/web/pkg/command/server.go +++ b/services/web/pkg/command/server.go @@ -93,6 +93,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) } diff --git a/services/webdav/pkg/command/server.go b/services/webdav/pkg/command/server.go index f065fd515..a189dd36e 100644 --- a/services/webdav/pkg/command/server.go +++ b/services/webdav/pkg/command/server.go @@ -3,6 +3,7 @@ package command import ( "context" "fmt" + "os" "github.com/oklog/run" "github.com/owncloud/ocis/v2/ocis-pkg/config/configlog" @@ -83,6 +84,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) } diff --git a/services/webfinger/pkg/command/server.go b/services/webfinger/pkg/command/server.go index 7874e8ff0..cfba7bf68 100644 --- a/services/webfinger/pkg/command/server.go +++ b/services/webfinger/pkg/command/server.go @@ -3,6 +3,7 @@ package command import ( "context" "fmt" + "os" "github.com/oklog/run" "github.com/owncloud/ocis/v2/ocis-pkg/config/configlog" @@ -96,6 +97,7 @@ func Server(cfg *config.Config) *cli.Command { Msg("Shutting down server") cancel() + os.Exit(1) }) }