79d2639ba1
also allows much more customization of services within captain planet, such as reconfiguring the overlay service to use redis
33 lines
705 B
Go
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)
|
|
}
|