config: Allow non-standard config dir to be configured with SSL. (#3583)

master
Harshavardhana 8 years ago committed by GitHub
parent caecd75a2a
commit bf2b8879b7
  1. 4
      cmd/globals.go
  2. 7
      cmd/main.go

@ -129,9 +129,7 @@ func setGlobalsFromContext(c *cli.Context) {
if globalConfigDir == "" {
console.Fatalf("Unable to get config file. Config directory is empty.")
}
// Set global quiet flag.
globalQuiet = c.Bool("quiet") || c.GlobalBool("quiet")
// Is TLS configured?.
globalIsSSL = isSSL()
}

@ -165,11 +165,14 @@ func checkUpdate() {
// Generic Minio initialization to create/load config, prepare loggers, etc..
func minioInit(ctx *cli.Context) {
// Sets new config directory.
setGlobalConfigPath(globalConfigDir)
// Set global variables after parsing passed arguments
setGlobalsFromContext(ctx)
// Sets new config directory.
setGlobalConfigPath(globalConfigDir)
// Is TLS configured?.
globalIsSSL = isSSL()
// Migrate any old version of config / state files to newer format.
migrate()

Loading…
Cancel
Save