|
|
@ -355,18 +355,18 @@ func gatewayMain(ctx *cli.Context, backendType gatewayBackend) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
serverAddr := ctx.String("address") |
|
|
|
serverAddr := ctx.String("address") |
|
|
|
endpointAddr := ctx.Args().Get(0) |
|
|
|
endpointAddr := ctx.Args().First() |
|
|
|
err := validateGatewayArguments(serverAddr, endpointAddr) |
|
|
|
err := validateGatewayArguments(serverAddr, endpointAddr) |
|
|
|
fatalIf(err, "Invalid argument") |
|
|
|
fatalIf(err, "Invalid argument") |
|
|
|
|
|
|
|
|
|
|
|
// Create certs path for SSL configuration.
|
|
|
|
// Create certs path for SSL configuration.
|
|
|
|
fatalIf(createConfigDir(), "Unable to create configuration directory") |
|
|
|
fatalIf(createConfigDir(), "Unable to create configuration directory") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
initNSLock(false) // Enable local namespace lock.
|
|
|
|
|
|
|
|
|
|
|
|
newObject, err := newGatewayLayer(backendType, ctx.Args()[1:]) |
|
|
|
newObject, err := newGatewayLayer(backendType, ctx.Args()[1:]) |
|
|
|
fatalIf(err, "Unable to initialize gateway layer") |
|
|
|
fatalIf(err, "Unable to initialize gateway layer") |
|
|
|
|
|
|
|
|
|
|
|
initNSLock(false) // Enable local namespace lock.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
router := mux.NewRouter().SkipClean(true) |
|
|
|
router := mux.NewRouter().SkipClean(true) |
|
|
|
|
|
|
|
|
|
|
|
// credentials Envs are set globally.
|
|
|
|
// credentials Envs are set globally.
|
|
|
@ -432,9 +432,12 @@ func gatewayMain(ctx *cli.Context, backendType gatewayBackend) { |
|
|
|
// Prints the formatted startup message once object layer is initialized.
|
|
|
|
// Prints the formatted startup message once object layer is initialized.
|
|
|
|
if !quietFlag { |
|
|
|
if !quietFlag { |
|
|
|
mode := "" |
|
|
|
mode := "" |
|
|
|
if gatewayBackend(backendType) == azureBackend { |
|
|
|
switch gatewayBackend(backendType) { |
|
|
|
|
|
|
|
case azureBackend: |
|
|
|
mode = globalMinioModeGatewayAzure |
|
|
|
mode = globalMinioModeGatewayAzure |
|
|
|
} else if gatewayBackend(backendType) == s3Backend { |
|
|
|
case gcsBackend: |
|
|
|
|
|
|
|
mode = globalMinioModeGatewayGCS |
|
|
|
|
|
|
|
case s3Backend: |
|
|
|
mode = globalMinioModeGatewayS3 |
|
|
|
mode = globalMinioModeGatewayS3 |
|
|
|
} |
|
|
|
} |
|
|
|
checkUpdate(mode) |
|
|
|
checkUpdate(mode) |
|
|
|