diff --git a/main.go b/main.go index 0e65418c..6a71d607 100644 --- a/main.go +++ b/main.go @@ -9,7 +9,7 @@ import ( "github.com/wh1te909/tacticalrmm/natsapi" ) -var version = "1.0.1" +var version = "1.0.2" func main() { ver := flag.Bool("version", false, "Prints version") @@ -23,5 +23,5 @@ func main() { return } - api.Listen(*apiHost, *natsHost, *debug) + api.Listen(*apiHost, *natsHost, version, *debug) } diff --git a/natsapi/api.go b/natsapi/api.go index f00b9bda..4de03d6f 100644 --- a/natsapi/api.go +++ b/natsapi/api.go @@ -40,16 +40,15 @@ func getAPI(apihost, natshost string) (string, string, error) { return "", "", errors.New("unable to parse api from nginx conf") } -func Listen(apihost, natshost string, debug bool) { +func Listen(apihost, natshost, version string, debug bool) { api, natsurl, err := getAPI(apihost, natshost) if err != nil { log.Fatalln(err) } - if debug { - log.Println("Api base url: ", api) - log.Println("Nats connection url: ", natsurl) - } + log.Printf("Tactical Nats API Version %s\n", version) + log.Println("Api base url: ", api) + log.Println("Nats connection url: ", natsurl) rClient.SetHostURL(api) rClient.SetTimeout(30 * time.Second) diff --git a/natsapi/bin/nats-api b/natsapi/bin/nats-api index cf310445..e4dccf6d 100755 Binary files a/natsapi/bin/nats-api and b/natsapi/bin/nats-api differ