mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 12:10:24 +03:00
Add support for reading and saving config on Gateway. (#4463)
This is also a first step towards supporting bucket notification for gateway.
This commit is contained in:
@@ -52,7 +52,7 @@ func printStartupMessage(apiEndPoints []string) {
|
||||
|
||||
// Prints `mc` cli configuration message chooses
|
||||
// first endpoint as default.
|
||||
printCLIAccessMsg(strippedAPIEndpoints[0])
|
||||
printCLIAccessMsg(strippedAPIEndpoints[0], "myminio")
|
||||
|
||||
// Prints documentation message.
|
||||
printObjectAPIMsg()
|
||||
@@ -141,17 +141,17 @@ func printEventNotifiers() {
|
||||
|
||||
// Prints startup message for command line access. Prints link to our documentation
|
||||
// and custom platform specific message.
|
||||
func printCLIAccessMsg(endPoint string) {
|
||||
func printCLIAccessMsg(endPoint string, alias string) {
|
||||
// Get saved credentials.
|
||||
cred := serverConfig.GetCredential()
|
||||
|
||||
// Configure 'mc', following block prints platform specific information for minio client.
|
||||
log.Println(colorBlue("\nCommand-line Access: ") + mcQuickStartGuide)
|
||||
if runtime.GOOS == globalWindowsOSName {
|
||||
mcMessage := fmt.Sprintf("$ mc.exe config host add myminio %s %s %s", endPoint, cred.AccessKey, cred.SecretKey)
|
||||
mcMessage := fmt.Sprintf("$ mc.exe config host add %s %s %s %s", alias, endPoint, cred.AccessKey, cred.SecretKey)
|
||||
log.Println(fmt.Sprintf(getFormatStr(len(mcMessage), 3), mcMessage))
|
||||
} else {
|
||||
mcMessage := fmt.Sprintf("$ mc config host add myminio %s %s %s", endPoint, cred.AccessKey, cred.SecretKey)
|
||||
mcMessage := fmt.Sprintf("$ mc config host add %s %s %s %s", alias, endPoint, cred.AccessKey, cred.SecretKey)
|
||||
log.Println(fmt.Sprintf(getFormatStr(len(mcMessage), 3), mcMessage))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user