Rebrand pkg

This commit is contained in:
André Duffeck
2025-01-20 09:34:32 +01:00
parent c99cf22a10
commit 1fff27f281
15 changed files with 40 additions and 40 deletions
+6 -6
View File
@@ -7,7 +7,7 @@ import (
"os"
"strings"
ocisinit "github.com/opencloud-eu/opencloud/opencloud/pkg/init"
ocinit "github.com/opencloud-eu/opencloud/opencloud/pkg/init"
"github.com/opencloud-eu/opencloud/opencloud/pkg/register"
"github.com/opencloud-eu/opencloud/pkg/config"
"github.com/opencloud-eu/opencloud/pkg/config/defaults"
@@ -18,13 +18,13 @@ import (
func InitCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "init",
Usage: "initialise an ocis config",
Usage: "initialise an OpenCloud config",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "insecure",
EnvVars: []string{"OC_INSECURE"},
Value: "ask",
Usage: "Allow insecure oCIS config",
Usage: "Allow insecure OpenCloud config",
},
&cli.BoolFlag{
Name: "diff",
@@ -42,7 +42,7 @@ func InitCommand(cfg *config.Config) *cli.Command {
&cli.StringFlag{
Name: "config-path",
Value: defaults.BaseConfigPath(),
Usage: "Config path for the ocis runtime",
Usage: "Config path for the OpenCloud runtime",
EnvVars: []string{"OC_CONFIG_DIR", "OC_BASE_DATA_PATH"},
},
&cli.StringFlag{
@@ -56,14 +56,14 @@ func InitCommand(cfg *config.Config) *cli.Command {
insecureFlag := c.String("insecure")
insecure := false
if insecureFlag == "ask" {
answer := strings.ToLower(stringPrompt("Do you want to configure Infinite Scale with certificate checking disabled?\n This is not recommended for public instances! [yes | no = default]"))
answer := strings.ToLower(stringPrompt("Do you want to configure OpenCloud with certificate checking disabled?\n This is not recommended for public instances! [yes | no = default]"))
if answer == "yes" || answer == "y" {
insecure = true
}
} else if insecureFlag == strings.ToLower("true") || insecureFlag == strings.ToLower("yes") || insecureFlag == strings.ToLower("y") {
insecure = true
}
err := ocisinit.CreateConfig(insecure, c.Bool("force-overwrite"), c.Bool("diff"), c.String("config-path"), c.String("admin-password"))
err := ocinit.CreateConfig(insecure, c.Bool("force-overwrite"), c.Bool("diff"), c.String("config-path"), c.String("admin-password"))
if err != nil {
log.Fatalf("Could not create config: %s", err)
}