mirror of
https://github.com/cirruslabs/orchard.git
synced 2026-10-18 04:43:12 +02:00
Introduce "controller init" and generate self-signed X.509 certificate (#17)
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
var dataDir string
|
||||
var dataDirPath string
|
||||
|
||||
func NewCommand() *cobra.Command {
|
||||
command := &cobra.Command{
|
||||
@@ -15,15 +15,15 @@ func NewCommand() *cobra.Command {
|
||||
Short: "Initialize and run a controller on the local machine",
|
||||
}
|
||||
|
||||
command.AddCommand(newRunCommand())
|
||||
command.AddCommand(newInitCommand(), newRunCommand())
|
||||
|
||||
orchardHome, err := orchardhome.Path()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
command.PersistentFlags().StringVar(&dataDir, "data-dir", filepath.Join(orchardHome, "controller"),
|
||||
"path to the data directory")
|
||||
command.PersistentFlags().StringVar(&dataDirPath, "data-dir", filepath.Join(orchardHome, "controller"),
|
||||
"path to the data controller's directory")
|
||||
|
||||
return command
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user