From 151ccb160993b17aba49f71bd07a9f54b4fa697a Mon Sep 17 00:00:00 2001 From: Florian Schade Date: Thu, 18 Dec 2025 09:56:03 +0100 Subject: [PATCH 1/2] fix: remove unsupported service binary entrypoints --- services/activitylog/cmd/activitylog/main.go | 19 ------------------- services/antivirus/cmd/antivirus/main.go | 19 ------------------- .../app-provider/cmd/app-provider/main.go | 19 ------------------- .../app-registry/cmd/app-registry/main.go | 19 ------------------- services/audit/cmd/audit/main.go | 19 ------------------- services/auth-app/cmd/auth-app/main.go | 19 ------------------- services/auth-basic/cmd/auth-basic/main.go | 19 ------------------- services/auth-bearer/cmd/auth-bearer/main.go | 19 ------------------- .../auth-machine/cmd/auth-machine/main.go | 19 ------------------- .../auth-service/cmd/auth-service/main.go | 19 ------------------- services/clientlog/cmd/clientlog/main.go | 19 ------------------- .../collaboration/cmd/collaboration/main.go | 19 ------------------- .../eventhistory/cmd/eventhistory/main.go | 19 ------------------- services/frontend/cmd/frontend/main.go | 19 ------------------- services/gateway/cmd/gateway/main.go | 19 ------------------- services/graph/cmd/graph/main.go | 19 ------------------- services/groups/cmd/groups/main.go | 19 ------------------- services/idm/cmd/idm/main.go | 19 ------------------- services/idp/cmd/idp/main.go | 19 ------------------- services/invitations/cmd/invitations/main.go | 19 ------------------- services/nats/cmd/nats/main.go | 19 ------------------- .../notifications/cmd/notifications/main.go | 19 ------------------- services/ocdav/cmd/ocdav/main.go | 19 ------------------- services/ocm/cmd/ocm/main.go | 19 ------------------- services/ocs/cmd/ocs/main.go | 19 ------------------- services/policies/cmd/policies/main.go | 19 ------------------- .../postprocessing/cmd/postprocessing/main.go | 19 ------------------- services/proxy/cmd/proxy/main.go | 19 ------------------- services/search/cmd/search/main.go | 19 ------------------- services/settings/cmd/settings/main.go | 19 ------------------- services/sharing/cmd/sharing/main.go | 19 ------------------- services/sse/cmd/sse/main.go | 19 ------------------- .../cmd/storage-publiclink/main.go | 19 ------------------- .../storage-shares/cmd/storage-shares/main.go | 19 ------------------- .../storage-system/cmd/storage-system/main.go | 19 ------------------- .../storage-users/cmd/storage-users/main.go | 19 ------------------- services/thumbnails/cmd/thumbnails/main.go | 19 ------------------- services/userlog/cmd/userlog/main.go | 19 ------------------- services/users/cmd/users/main.go | 19 ------------------- services/web/cmd/web/main.go | 19 ------------------- services/webdav/cmd/webdav/main.go | 19 ------------------- services/webfinger/cmd/webfinger/main.go | 19 ------------------- 42 files changed, 798 deletions(-) delete mode 100644 services/activitylog/cmd/activitylog/main.go delete mode 100644 services/antivirus/cmd/antivirus/main.go delete mode 100644 services/app-provider/cmd/app-provider/main.go delete mode 100644 services/app-registry/cmd/app-registry/main.go delete mode 100644 services/audit/cmd/audit/main.go delete mode 100644 services/auth-app/cmd/auth-app/main.go delete mode 100644 services/auth-basic/cmd/auth-basic/main.go delete mode 100644 services/auth-bearer/cmd/auth-bearer/main.go delete mode 100644 services/auth-machine/cmd/auth-machine/main.go delete mode 100644 services/auth-service/cmd/auth-service/main.go delete mode 100644 services/clientlog/cmd/clientlog/main.go delete mode 100644 services/collaboration/cmd/collaboration/main.go delete mode 100644 services/eventhistory/cmd/eventhistory/main.go delete mode 100644 services/frontend/cmd/frontend/main.go delete mode 100644 services/gateway/cmd/gateway/main.go delete mode 100644 services/graph/cmd/graph/main.go delete mode 100644 services/groups/cmd/groups/main.go delete mode 100644 services/idm/cmd/idm/main.go delete mode 100644 services/idp/cmd/idp/main.go delete mode 100644 services/invitations/cmd/invitations/main.go delete mode 100644 services/nats/cmd/nats/main.go delete mode 100644 services/notifications/cmd/notifications/main.go delete mode 100644 services/ocdav/cmd/ocdav/main.go delete mode 100644 services/ocm/cmd/ocm/main.go delete mode 100644 services/ocs/cmd/ocs/main.go delete mode 100644 services/policies/cmd/policies/main.go delete mode 100644 services/postprocessing/cmd/postprocessing/main.go delete mode 100644 services/proxy/cmd/proxy/main.go delete mode 100644 services/search/cmd/search/main.go delete mode 100644 services/settings/cmd/settings/main.go delete mode 100644 services/sharing/cmd/sharing/main.go delete mode 100644 services/sse/cmd/sse/main.go delete mode 100644 services/storage-publiclink/cmd/storage-publiclink/main.go delete mode 100644 services/storage-shares/cmd/storage-shares/main.go delete mode 100644 services/storage-system/cmd/storage-system/main.go delete mode 100644 services/storage-users/cmd/storage-users/main.go delete mode 100644 services/thumbnails/cmd/thumbnails/main.go delete mode 100644 services/userlog/cmd/userlog/main.go delete mode 100644 services/users/cmd/users/main.go delete mode 100644 services/web/cmd/web/main.go delete mode 100644 services/webdav/cmd/webdav/main.go delete mode 100644 services/webfinger/cmd/webfinger/main.go diff --git a/services/activitylog/cmd/activitylog/main.go b/services/activitylog/cmd/activitylog/main.go deleted file mode 100644 index 64571354fe..0000000000 --- a/services/activitylog/cmd/activitylog/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/activitylog/pkg/command" - "github.com/opencloud-eu/opencloud/services/activitylog/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) - } -} diff --git a/services/antivirus/cmd/antivirus/main.go b/services/antivirus/cmd/antivirus/main.go deleted file mode 100644 index dfa798fabf..0000000000 --- a/services/antivirus/cmd/antivirus/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/antivirus/pkg/command" - "github.com/opencloud-eu/opencloud/services/antivirus/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) - } -} diff --git a/services/app-provider/cmd/app-provider/main.go b/services/app-provider/cmd/app-provider/main.go deleted file mode 100644 index b5125c5087..0000000000 --- a/services/app-provider/cmd/app-provider/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/app-provider/pkg/command" - "github.com/opencloud-eu/opencloud/services/app-provider/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) - } -} diff --git a/services/app-registry/cmd/app-registry/main.go b/services/app-registry/cmd/app-registry/main.go deleted file mode 100644 index 7dd9732db8..0000000000 --- a/services/app-registry/cmd/app-registry/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/app-registry/pkg/command" - "github.com/opencloud-eu/opencloud/services/app-registry/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) - } -} diff --git a/services/audit/cmd/audit/main.go b/services/audit/cmd/audit/main.go deleted file mode 100644 index 7034fa314e..0000000000 --- a/services/audit/cmd/audit/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/audit/pkg/command" - "github.com/opencloud-eu/opencloud/services/audit/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) - } -} diff --git a/services/auth-app/cmd/auth-app/main.go b/services/auth-app/cmd/auth-app/main.go deleted file mode 100644 index 47a34876ff..0000000000 --- a/services/auth-app/cmd/auth-app/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/auth-app/pkg/command" - "github.com/opencloud-eu/opencloud/services/auth-app/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) - } -} diff --git a/services/auth-basic/cmd/auth-basic/main.go b/services/auth-basic/cmd/auth-basic/main.go deleted file mode 100644 index 84d5056556..0000000000 --- a/services/auth-basic/cmd/auth-basic/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/auth-basic/pkg/command" - "github.com/opencloud-eu/opencloud/services/auth-basic/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) - } -} diff --git a/services/auth-bearer/cmd/auth-bearer/main.go b/services/auth-bearer/cmd/auth-bearer/main.go deleted file mode 100644 index 822ce045d2..0000000000 --- a/services/auth-bearer/cmd/auth-bearer/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/auth-bearer/pkg/command" - "github.com/opencloud-eu/opencloud/services/auth-bearer/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) - } -} diff --git a/services/auth-machine/cmd/auth-machine/main.go b/services/auth-machine/cmd/auth-machine/main.go deleted file mode 100644 index c9bf4b6dd8..0000000000 --- a/services/auth-machine/cmd/auth-machine/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/auth-machine/pkg/command" - "github.com/opencloud-eu/opencloud/services/auth-machine/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) - } -} diff --git a/services/auth-service/cmd/auth-service/main.go b/services/auth-service/cmd/auth-service/main.go deleted file mode 100644 index 9b7f9689ec..0000000000 --- a/services/auth-service/cmd/auth-service/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/auth-service/pkg/command" - "github.com/opencloud-eu/opencloud/services/auth-service/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) - } -} diff --git a/services/clientlog/cmd/clientlog/main.go b/services/clientlog/cmd/clientlog/main.go deleted file mode 100644 index e806917e99..0000000000 --- a/services/clientlog/cmd/clientlog/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/clientlog/pkg/command" - "github.com/opencloud-eu/opencloud/services/clientlog/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) - } -} diff --git a/services/collaboration/cmd/collaboration/main.go b/services/collaboration/cmd/collaboration/main.go deleted file mode 100644 index 64571354fe..0000000000 --- a/services/collaboration/cmd/collaboration/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/activitylog/pkg/command" - "github.com/opencloud-eu/opencloud/services/activitylog/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) - } -} diff --git a/services/eventhistory/cmd/eventhistory/main.go b/services/eventhistory/cmd/eventhistory/main.go deleted file mode 100644 index 990b2c024e..0000000000 --- a/services/eventhistory/cmd/eventhistory/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/eventhistory/pkg/command" - "github.com/opencloud-eu/opencloud/services/eventhistory/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) - } -} diff --git a/services/frontend/cmd/frontend/main.go b/services/frontend/cmd/frontend/main.go deleted file mode 100644 index 4d5273e793..0000000000 --- a/services/frontend/cmd/frontend/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/frontend/pkg/command" - "github.com/opencloud-eu/opencloud/services/frontend/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) - } -} diff --git a/services/gateway/cmd/gateway/main.go b/services/gateway/cmd/gateway/main.go deleted file mode 100644 index f9392d3b21..0000000000 --- a/services/gateway/cmd/gateway/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/gateway/pkg/command" - "github.com/opencloud-eu/opencloud/services/gateway/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) - } -} diff --git a/services/graph/cmd/graph/main.go b/services/graph/cmd/graph/main.go deleted file mode 100644 index 799a689921..0000000000 --- a/services/graph/cmd/graph/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/graph/pkg/command" - "github.com/opencloud-eu/opencloud/services/graph/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) - } -} diff --git a/services/groups/cmd/groups/main.go b/services/groups/cmd/groups/main.go deleted file mode 100644 index 047ce782d2..0000000000 --- a/services/groups/cmd/groups/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/groups/pkg/command" - "github.com/opencloud-eu/opencloud/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) - } -} diff --git a/services/idm/cmd/idm/main.go b/services/idm/cmd/idm/main.go deleted file mode 100644 index 6ea0627250..0000000000 --- a/services/idm/cmd/idm/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/idm/pkg/command" - "github.com/opencloud-eu/opencloud/services/idm/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) - } -} diff --git a/services/idp/cmd/idp/main.go b/services/idp/cmd/idp/main.go deleted file mode 100644 index 0c0f4d1141..0000000000 --- a/services/idp/cmd/idp/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/idp/pkg/command" - "github.com/opencloud-eu/opencloud/services/idp/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) - } -} diff --git a/services/invitations/cmd/invitations/main.go b/services/invitations/cmd/invitations/main.go deleted file mode 100644 index 265c5c7506..0000000000 --- a/services/invitations/cmd/invitations/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/invitations/pkg/command" - "github.com/opencloud-eu/opencloud/services/invitations/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) - } -} diff --git a/services/nats/cmd/nats/main.go b/services/nats/cmd/nats/main.go deleted file mode 100644 index a34a9a5432..0000000000 --- a/services/nats/cmd/nats/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/nats/pkg/command" - "github.com/opencloud-eu/opencloud/services/nats/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) - } -} diff --git a/services/notifications/cmd/notifications/main.go b/services/notifications/cmd/notifications/main.go deleted file mode 100644 index 4c9c89b598..0000000000 --- a/services/notifications/cmd/notifications/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/notifications/pkg/command" - "github.com/opencloud-eu/opencloud/services/notifications/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) - } -} diff --git a/services/ocdav/cmd/ocdav/main.go b/services/ocdav/cmd/ocdav/main.go deleted file mode 100644 index 1534587111..0000000000 --- a/services/ocdav/cmd/ocdav/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/ocdav/pkg/command" - "github.com/opencloud-eu/opencloud/services/ocdav/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) - } -} diff --git a/services/ocm/cmd/ocm/main.go b/services/ocm/cmd/ocm/main.go deleted file mode 100644 index 085d9745a7..0000000000 --- a/services/ocm/cmd/ocm/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/ocm/pkg/command" - "github.com/opencloud-eu/opencloud/services/ocm/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) - } -} diff --git a/services/ocs/cmd/ocs/main.go b/services/ocs/cmd/ocs/main.go deleted file mode 100644 index bbb5096f44..0000000000 --- a/services/ocs/cmd/ocs/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/ocs/pkg/command" - "github.com/opencloud-eu/opencloud/services/ocs/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) - } -} diff --git a/services/policies/cmd/policies/main.go b/services/policies/cmd/policies/main.go deleted file mode 100644 index f8c85f3f91..0000000000 --- a/services/policies/cmd/policies/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/policies/pkg/command" - "github.com/opencloud-eu/opencloud/services/policies/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) - } -} diff --git a/services/postprocessing/cmd/postprocessing/main.go b/services/postprocessing/cmd/postprocessing/main.go deleted file mode 100644 index 5d3c494378..0000000000 --- a/services/postprocessing/cmd/postprocessing/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/postprocessing/pkg/command" - "github.com/opencloud-eu/opencloud/services/postprocessing/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) - } -} diff --git a/services/proxy/cmd/proxy/main.go b/services/proxy/cmd/proxy/main.go deleted file mode 100644 index 5f62cc32a6..0000000000 --- a/services/proxy/cmd/proxy/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/proxy/pkg/command" - "github.com/opencloud-eu/opencloud/services/proxy/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) - } -} diff --git a/services/search/cmd/search/main.go b/services/search/cmd/search/main.go deleted file mode 100644 index 87dcc740f9..0000000000 --- a/services/search/cmd/search/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/search/pkg/command" - "github.com/opencloud-eu/opencloud/services/search/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) - } -} diff --git a/services/settings/cmd/settings/main.go b/services/settings/cmd/settings/main.go deleted file mode 100644 index 9f2abed104..0000000000 --- a/services/settings/cmd/settings/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/settings/pkg/command" - "github.com/opencloud-eu/opencloud/services/settings/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) - } -} diff --git a/services/sharing/cmd/sharing/main.go b/services/sharing/cmd/sharing/main.go deleted file mode 100644 index 7458b8c608..0000000000 --- a/services/sharing/cmd/sharing/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/sharing/pkg/command" - "github.com/opencloud-eu/opencloud/services/sharing/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) - } -} diff --git a/services/sse/cmd/sse/main.go b/services/sse/cmd/sse/main.go deleted file mode 100644 index 5989784fb9..0000000000 --- a/services/sse/cmd/sse/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/sse/pkg/command" - "github.com/opencloud-eu/opencloud/services/sse/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) - } -} diff --git a/services/storage-publiclink/cmd/storage-publiclink/main.go b/services/storage-publiclink/cmd/storage-publiclink/main.go deleted file mode 100644 index d701afd33d..0000000000 --- a/services/storage-publiclink/cmd/storage-publiclink/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/storage-publiclink/pkg/command" - "github.com/opencloud-eu/opencloud/services/storage-publiclink/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) - } -} diff --git a/services/storage-shares/cmd/storage-shares/main.go b/services/storage-shares/cmd/storage-shares/main.go deleted file mode 100644 index 97f2705d58..0000000000 --- a/services/storage-shares/cmd/storage-shares/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/storage-shares/pkg/command" - "github.com/opencloud-eu/opencloud/services/storage-shares/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) - } -} diff --git a/services/storage-system/cmd/storage-system/main.go b/services/storage-system/cmd/storage-system/main.go deleted file mode 100644 index f5868adc59..0000000000 --- a/services/storage-system/cmd/storage-system/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/storage-system/pkg/command" - "github.com/opencloud-eu/opencloud/services/storage-system/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) - } -} diff --git a/services/storage-users/cmd/storage-users/main.go b/services/storage-users/cmd/storage-users/main.go deleted file mode 100644 index ef5dcf6a36..0000000000 --- a/services/storage-users/cmd/storage-users/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/storage-users/pkg/command" - "github.com/opencloud-eu/opencloud/services/storage-users/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) - } -} diff --git a/services/thumbnails/cmd/thumbnails/main.go b/services/thumbnails/cmd/thumbnails/main.go deleted file mode 100644 index 8a96872270..0000000000 --- a/services/thumbnails/cmd/thumbnails/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/thumbnails/pkg/command" - "github.com/opencloud-eu/opencloud/services/thumbnails/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) - } -} diff --git a/services/userlog/cmd/userlog/main.go b/services/userlog/cmd/userlog/main.go deleted file mode 100644 index 41576c9416..0000000000 --- a/services/userlog/cmd/userlog/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/userlog/pkg/command" - "github.com/opencloud-eu/opencloud/services/userlog/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) - } -} diff --git a/services/users/cmd/users/main.go b/services/users/cmd/users/main.go deleted file mode 100644 index 01d5773f57..0000000000 --- a/services/users/cmd/users/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/users/pkg/command" - "github.com/opencloud-eu/opencloud/services/users/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) - } -} diff --git a/services/web/cmd/web/main.go b/services/web/cmd/web/main.go deleted file mode 100644 index 23e5db9cbd..0000000000 --- a/services/web/cmd/web/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/web/pkg/command" - "github.com/opencloud-eu/opencloud/services/web/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) - } -} diff --git a/services/webdav/cmd/webdav/main.go b/services/webdav/cmd/webdav/main.go deleted file mode 100644 index f19c6d3ee7..0000000000 --- a/services/webdav/cmd/webdav/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/webdav/pkg/command" - "github.com/opencloud-eu/opencloud/services/webdav/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) - } -} diff --git a/services/webfinger/cmd/webfinger/main.go b/services/webfinger/cmd/webfinger/main.go deleted file mode 100644 index f03cab2447..0000000000 --- a/services/webfinger/cmd/webfinger/main.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "context" - "os" - "os/signal" - "syscall" - - "github.com/opencloud-eu/opencloud/services/webfinger/pkg/command" - "github.com/opencloud-eu/opencloud/services/webfinger/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) - } -} From c5c53990675763aa4e62115600a9cc5a1e28d9af Mon Sep 17 00:00:00 2001 From: Florian Schade Date: Thu, 18 Dec 2025 09:56:17 +0100 Subject: [PATCH 2/2] fix: make the common config available for the antivirus service --- opencloud/pkg/command/services.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencloud/pkg/command/services.go b/opencloud/pkg/command/services.go index b25823476c..a3622cf871 100644 --- a/opencloud/pkg/command/services.go +++ b/opencloud/pkg/command/services.go @@ -61,7 +61,7 @@ var serviceCommands = []register.Command{ }, func(cfg *config.Config) *cobra.Command { return ServiceCommand(cfg, cfg.Antivirus.Service.Name, antivirus.GetCommands(cfg.Antivirus), func(c *config.Config) { - // cfg.Antivirus.Commons = cfg.Commons // antivirus needs no commons atm + cfg.Antivirus.Commons = cfg.Commons }) }, func(cfg *config.Config) *cobra.Command {