mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-04-05 20:52:50 +08:00
Merge pull request #1092 from binbinshi/master
fix: weed shell filer config is constant
This commit is contained in:
commit
05fe7a2366
@ -14,6 +14,12 @@ var (
|
|||||||
func init() {
|
func init() {
|
||||||
cmdShell.Run = runShell // break init cycle
|
cmdShell.Run = runShell // break init cycle
|
||||||
shellOptions.Masters = cmdShell.Flag.String("master", "localhost:9333", "comma-separated master servers")
|
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{
|
var cmdShell = &Command{
|
||||||
@ -24,19 +30,14 @@ var cmdShell = &Command{
|
|||||||
`,
|
`,
|
||||||
}
|
}
|
||||||
|
|
||||||
var ()
|
|
||||||
|
|
||||||
func runShell(command *Command, args []string) bool {
|
func runShell(command *Command, args []string) bool {
|
||||||
|
|
||||||
util.LoadConfiguration("security", false)
|
util.LoadConfiguration("security", false)
|
||||||
shellOptions.GrpcDialOption = security.LoadClientTLS(viper.Sub("grpc"), "client")
|
shellOptions.GrpcDialOption = security.LoadClientTLS(viper.Sub("grpc"), "client")
|
||||||
|
|
||||||
shellOptions.FilerHost = "localhost"
|
|
||||||
shellOptions.FilerPort = 8888
|
|
||||||
shellOptions.Directory = "/"
|
|
||||||
|
|
||||||
shell.RunShell(shellOptions)
|
shell.RunShell(shellOptions)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user