minio: Add config-folder option.

Fixes #997
This commit is contained in:
Harshavardhana
2015-12-06 14:31:20 -08:00
parent a97c4ebce3
commit 836f5204af
19 changed files with 149 additions and 202 deletions

View File

@@ -243,29 +243,23 @@ func initServer() *probe.Error {
return err.Trace()
}
if conf != nil {
if globalJSONFlag {
Println(accessKeys{conf}.JSON())
} else {
Println()
Println(accessKeys{conf})
}
}
if !globalJSONFlag {
Println("\nTo configure Minio Client.")
if runtime.GOOS == "windows" {
Println("\n\tDownload https://dl.minio.io:9000/updates/2015/Nov/" + runtime.GOOS + "-" + runtime.GOARCH + "/mc.exe")
Println("\t$ mc.exe config host add http://localhost:9000 " + conf.Credentials.AccessKeyID + " " + conf.Credentials.SecretAccessKey)
Println("\t$ mc.exe mb localhost/photobucket")
Println("\t$ mc.exe cp C:\\Photos... localhost/photobucket")
} else {
Println("\n\t$ wget https://dl.minio.io:9000/updates/2015/Nov/" + runtime.GOOS + "-" + runtime.GOARCH + "/mc")
Println("\t$ chmod 755 mc")
Println("\t$ ./mc config host add http://localhost:9000 " + conf.Credentials.AccessKeyID + " " + conf.Credentials.SecretAccessKey)
Println("\t$ ./mc mb localhost/photobucket")
Println("\t$ ./mc cp ~/Photos... localhost/photobucket")
}
Println()
Println(accessKeys{conf})
}
Println("\nTo configure Minio Client.")
if runtime.GOOS == "windows" {
Println("\n\tDownload https://dl.minio.io:9000/updates/2015/Nov/" + runtime.GOOS + "-" + runtime.GOARCH + "/mc.exe")
Println("\t$ mc.exe config host add http://localhost:9000 " + conf.Credentials.AccessKeyID + " " + conf.Credentials.SecretAccessKey)
Println("\t$ mc.exe mb localhost/photobucket")
Println("\t$ mc.exe cp C:\\Photos... localhost/photobucket")
} else {
Println("\n\t$ wget https://dl.minio.io:9000/updates/2015/Nov/" + runtime.GOOS + "-" + runtime.GOARCH + "/mc")
Println("\t$ chmod 755 mc")
Println("\t$ ./mc config host add http://localhost:9000 " + conf.Credentials.AccessKeyID + " " + conf.Credentials.SecretAccessKey)
Println("\t$ ./mc mb localhost/photobucket")
Println("\t$ ./mc cp ~/Photos... localhost/photobucket")
}
Println()
return nil
}