aboutsummaryrefslogtreecommitdiff
path: root/weed/command/shell.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2019-10-25 07:08:59 -0700
committerGitHub <noreply@github.com>2019-10-25 07:08:59 -0700
commit05fe7a23669197a828889f0be7d60f85661f1042 (patch)
tree5309d7936bd17d461e2b0116dfe36e6e8af10320 /weed/command/shell.go
parent7a51a9a5823576aa540684aac6424b5793a9e285 (diff)
parentfe1f469978eae6ab57d3b2b93ab82a57468302c4 (diff)
downloadseaweedfs-05fe7a23669197a828889f0be7d60f85661f1042.tar.xz
seaweedfs-05fe7a23669197a828889f0be7d60f85661f1042.zip
Merge pull request #1092 from binbinshi/master
fix: weed shell filer config is constant
Diffstat (limited to 'weed/command/shell.go')
-rw-r--r--weed/command/shell.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/weed/command/shell.go b/weed/command/shell.go
index 79f8b8bf9..eae68c3be 100644
--- a/weed/command/shell.go
+++ b/weed/command/shell.go
@@ -14,6 +14,12 @@ var (
func init() {
cmdShell.Run = runShell // break init cycle
shellOptions.Masters = cmdShell.Flag.String("master", "localhost:9333", "comma-separated master servers")
+ filerHost := cmdShell.Flag.String("filer.host", "localhost", "comma-separated filer server host")
+ flierPort := cmdShell.Flag.Int64("filer.port", 8888, "comma-separated filer server port")
+ directory := cmdShell.Flag.String("filer.dir", "/", "comma-separated filer server directory")
+ shellOptions.FilerHost = *filerHost
+ shellOptions.FilerPort = *flierPort
+ shellOptions.Directory = *directory
}
var cmdShell = &Command{
@@ -24,19 +30,14 @@ var cmdShell = &Command{
`,
}
-var ()
func runShell(command *Command, args []string) bool {
util.LoadConfiguration("security", false)
shellOptions.GrpcDialOption = security.LoadClientTLS(viper.Sub("grpc"), "client")
- shellOptions.FilerHost = "localhost"
- shellOptions.FilerPort = 8888
- shellOptions.Directory = "/"
-
shell.RunShell(shellOptions)
return true
-}
+} \ No newline at end of file