|
|
@ -52,6 +52,10 @@ USAGE: |
|
|
|
OPTIONS: |
|
|
|
OPTIONS: |
|
|
|
{{range .Flags}}{{.}} |
|
|
|
{{range .Flags}}{{.}} |
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ENVIRONMENT VARIABLES: |
|
|
|
|
|
|
|
MINIO_ACCESS_KEY, MINIO_SECRET_KEY: Access and secret key to use. |
|
|
|
|
|
|
|
|
|
|
|
EXAMPLES: |
|
|
|
EXAMPLES: |
|
|
|
1. Start minio server on Linux. |
|
|
|
1. Start minio server on Linux. |
|
|
|
$ minio {{.Name}} /home/shared |
|
|
|
$ minio {{.Name}} /home/shared |
|
|
@ -259,6 +263,23 @@ func serverMain(c *cli.Context) { |
|
|
|
fatalIf(probe.NewError(errInvalidArgument), "Both certificate and key are required to enable https.", nil) |
|
|
|
fatalIf(probe.NewError(errInvalidArgument), "Both certificate and key are required to enable https.", nil) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
accessKey := os.Getenv("MINIO_ACCESS_KEY") |
|
|
|
|
|
|
|
secretKey := os.Getenv("MINIO_SECRET_KEY") |
|
|
|
|
|
|
|
if accessKey != "" && secretKey != "" { |
|
|
|
|
|
|
|
if !isValidAccessKey(accessKey) { |
|
|
|
|
|
|
|
fatalIf(probe.NewError(errInvalidArgument), "Access key does not have required length", nil) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if !isValidSecretKey(secretKey) { |
|
|
|
|
|
|
|
fatalIf(probe.NewError(errInvalidArgument), "Secret key does not have required length", nil) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
conf.Credentials.AccessKeyID = accessKey |
|
|
|
|
|
|
|
conf.Credentials.SecretAccessKey = secretKey |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
err = saveConfig(conf) |
|
|
|
|
|
|
|
fatalIf(err.Trace(), "Unable to save credentials to config.", nil) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
minFreeDisk, err := parsePercentToInt(c.String("min-free-disk"), 64) |
|
|
|
minFreeDisk, err := parsePercentToInt(c.String("min-free-disk"), 64) |
|
|
|
fatalIf(err.Trace(c.String("min-free-disk")), "Invalid minium free disk size "+c.String("min-free-disk")+" passed.", nil) |
|
|
|
fatalIf(err.Trace(c.String("min-free-disk")), "Invalid minium free disk size "+c.String("min-free-disk")+" passed.", nil) |
|
|
|
|
|
|
|
|
|
|
|