@ -41,28 +41,25 @@ type serverConfigV5 struct {
// initConfig - initialize server config. config version (called only once).
// initConfig - initialize server config. config version (called only once).
func initConfig ( ) error {
func initConfig ( ) error {
if ! isConfigFileExists ( ) {
if ! isConfigFileExists ( ) {
// Initialize server config.
srvCfg := & serverConfigV5 { }
srvCfg := & serverConfigV5 { }
srvCfg . Version = globalMinioConfigVersion
srvCfg . Version = globalMinioConfigVersion
srvCfg . Region = "us-east-1"
srvCfg . Region = "us-east-1"
srvCfg . Credential = mustGenAccessKeys ( )
srvCfg . Credential = mustGenAccessKeys ( )
// Enable console logger by default on a fresh run.
// Enable console logger by default on a fresh run.
srvCfg . Logger . Console = consoleLogger {
srvCfg . Logger . Console = consoleLogger {
Enable : true ,
Enable : true ,
Level : "fatal" ,
Level : "fatal" ,
}
}
srvCfg . rwMutex = & sync . RWMutex { }
srvCfg . rwMutex = & sync . RWMutex { }
// Create config path.
// Create config path.
err := createConfigPath ( )
err := createConfigPath ( )
if err != nil {
if err != nil {
return err
return err
}
}
// Create certs path.
err = createCertsPath ( )
if err != nil {
return err
}
// Save the new config globally.
// Save the new config globally.
serverConfig = srvCfg
serverConfig = srvCfg