aboutsummaryrefslogtreecommitdiff
path: root/weed/command/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/command/server.go')
-rw-r--r--weed/command/server.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/weed/command/server.go b/weed/command/server.go
index 45fb80b7a..ef2db9bfa 100644
--- a/weed/command/server.go
+++ b/weed/command/server.go
@@ -55,7 +55,7 @@ var cmdServer = &Command{
var (
serverIp = cmdServer.Flag.String("ip", util.DetectedHostAddress(), "ip or server name, also used as identifier")
- serverBindIp = cmdServer.Flag.String("ip.bind", "", "ip address to bind to")
+ serverBindIp = cmdServer.Flag.String("ip.bind", "", "ip address to bind to. If empty, default to same as -ip option.")
serverTimeout = cmdServer.Flag.Int("idleTimeout", 30, "connection idle seconds")
serverDataCenter = cmdServer.Flag.String("dataCenter", "", "current volume server's data center name")
serverRack = cmdServer.Flag.String("rack", "", "current volume server's rack name")
@@ -184,6 +184,10 @@ func runServer(cmd *Command, args []string) bool {
masterOptions.peers = &peers
}
+ if *serverBindIp == "" {
+ serverBindIp = serverIp
+ }
+
// ip address
masterOptions.ip = serverIp
masterOptions.ipBind = serverBindIp