diff --git a/scripts/steward/create-docker-compose-files/README.md b/scripts/steward/create-docker-compose-files/README.md index 8d472d4..563d5a3 100644 --- a/scripts/steward/create-docker-compose-files/README.md +++ b/scripts/steward/create-docker-compose-files/README.md @@ -12,10 +12,6 @@ cd my_dir git clone https://github.com/RaaLabs/steward.git ``` -Then create the public and private nkey's by running: - -`go run ./steward/scripts/nats-server/generate-nkeys/main.go` - To create the docker-compose and env.env run: ```bash diff --git a/scripts/steward/create-docker-compose-files/main.go b/scripts/steward/create-docker-compose-files/main.go index 7e9f28d..f2a4e9b 100644 --- a/scripts/steward/create-docker-compose-files/main.go +++ b/scripts/steward/create-docker-compose-files/main.go @@ -32,16 +32,18 @@ func generateNkeys(fileDir string) error { fmt.Println("scanning line : ", text) if strings.HasPrefix(text, "S") { - fmt.Println("found S") p := path.Join(fileDir, "seed.txt") err := writekey(p, []byte(text)) - return err + if err != nil { + return err + } } if strings.HasPrefix(text, "U") { - fmt.Println("found U") p := path.Join(fileDir, "user.txt") err := writekey(p, []byte(text)) - return err + if err != nil { + return err + } } } @@ -148,6 +150,7 @@ func main() { socketFolder := flag.String("socketFolder", "./tmp/", "the complete path of the socket folder to mount") templateDir := flag.String("templateDir", "./steward/scripts/steward/create-docker-compose-files/", "the directory path to where the template files are located") + flag.Parse() if *brokerAddress == "" {