1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-07-03 23:56:41 +02:00
seaweedfs/weed/command/shell.go
2019-03-16 13:43:16 -07:00

39 lines
808 B
Go

package command
import (
"github.com/chrislusf/seaweedfs/weed/security"
"github.com/chrislusf/seaweedfs/weed/server"
"github.com/chrislusf/seaweedfs/weed/shell"
"github.com/spf13/viper"
)
var (
shellOptions shell.ShellOptions
)
func init() {
cmdShell.Run = runShell // break init cycle
shellOptions.Masters = cmdShell.Flag.String("master", "localhost:9333", "comma-separated master servers")
}
var cmdShell = &Command{
UsageLine: "shell",
Short: "run interactive administrative commands",
Long: `run interactive administrative commands.
`,
}
var ()
func runShell(command *Command, args []string) bool {
weed_server.LoadConfiguration("security", false)
shellOptions.GrpcDialOption = security.LoadClientTLS(viper.Sub("grpc"), "client")
shell.RunShell(shellOptions)
return true
}