mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-01 09:52:23 -06:00
- Konnectd uses no TLS as it is behind the proxy - Glauth generates dev-certificates for ldap on startup if none are provided, - Glauth can launch unencrypted (9125) and encrypted (9126) port in parallel Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
43 lines
1.1 KiB
Go
43 lines
1.1 KiB
Go
package command
|
|
|
|
import (
|
|
"github.com/micro/cli/v2"
|
|
"github.com/owncloud/ocis-konnectd/pkg/command"
|
|
svcconfig "github.com/owncloud/ocis-konnectd/pkg/config"
|
|
"github.com/owncloud/ocis-konnectd/pkg/flagset"
|
|
"github.com/owncloud/ocis/pkg/config"
|
|
"github.com/owncloud/ocis/pkg/register"
|
|
)
|
|
|
|
// KonnectdCommand is the entrypoint for the konnectd command.
|
|
func KonnectdCommand(cfg *config.Config) *cli.Command {
|
|
return &cli.Command{
|
|
Name: "konnectd",
|
|
Usage: "Start konnectd server",
|
|
Category: "Extensions",
|
|
Flags: flagset.ServerWithConfig(cfg.Konnectd),
|
|
Action: func(c *cli.Context) error {
|
|
konnectdCommand := command.Server(configureKonnectd(cfg))
|
|
|
|
if err := konnectdCommand.Before(c); err != nil {
|
|
return err
|
|
}
|
|
|
|
return cli.HandleAction(konnectdCommand.Action, c)
|
|
},
|
|
}
|
|
}
|
|
|
|
func configureKonnectd(cfg *config.Config) *svcconfig.Config {
|
|
cfg.Konnectd.Log.Level = cfg.Log.Level
|
|
cfg.Konnectd.Log.Pretty = cfg.Log.Pretty
|
|
cfg.Konnectd.Log.Color = cfg.Log.Color
|
|
cfg.Konnectd.HTTP.TLS = false
|
|
|
|
return cfg.Konnectd
|
|
}
|
|
|
|
func init() {
|
|
register.AddCommand(KonnectdCommand)
|
|
}
|