storj/cmd/captplanet/main.go
JT Olio 79d2639ba1
cmd/hc, cmd/gw, cmd/captplanet: simplify setup/run commands (#178)
also allows much more customization of services within captain planet,
such as reconfiguring the overlay service to use redis
2018-07-30 01:38:31 -06:00

33 lines
705 B
Go

// Copyright (C) 2018 Storj Labs, Inc.
// See LICENSE for copying information.
package main
import (
"path/filepath"
"github.com/spf13/cobra"
monkit "gopkg.in/spacemonkeygo/monkit.v2"
"storj.io/storj/pkg/process"
)
var (
mon = monkit.Package()
rootCmd = &cobra.Command{
Use: "captplanet",
Short: "Captain Planet! With our powers combined!",
}
defaultConfDir = "$HOME/.storj/capt"
)
func main() {
// process.Exec will load this for this command.
runCmd.Flags().String("config",
filepath.Join(defaultConfDir, "config.yaml"), "path to configuration")
setupCmd.Flags().String("config",
filepath.Join(defaultConfDir, "setup.yaml"), "path to configuration")
process.Exec(rootCmd)
}