diff options
author | Arne Juul <arnej@yahooinc.com> | 2022-11-16 14:10:29 +0000 |
---|---|---|
committer | Arne Juul <arnej@yahooinc.com> | 2022-11-16 14:11:33 +0000 |
commit | 49d0d0e48147f56d5d5a005f335987a145de611c (patch) | |
tree | 40f9f959b56720ac7577a9ea9ab2388e60012570 /client | |
parent | 5789c55888d4fb2c77a44fdab4c4a47805fa0e12 (diff) |
add "detect-hostname" mode
Diffstat (limited to 'client')
-rw-r--r-- | client/go/script-utils/main.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/client/go/script-utils/main.go b/client/go/script-utils/main.go index 713a208a319..9d35cb46e1c 100644 --- a/client/go/script-utils/main.go +++ b/client/go/script-utils/main.go @@ -50,6 +50,13 @@ func main() { } else { os.Exit(1) } + case "detect-hostname": + myName, err := vespa.FindOurHostname() + fmt.Println(myName) + if err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } case "vespa-deploy": cobra := deploy.NewDeployCmd() cobra.Execute() @@ -70,7 +77,7 @@ func main() { os.Exit(startcbinary.Run(os.Args)) } fmt.Fprintf(os.Stderr, "unknown action '%s'\n", action) - fmt.Fprintln(os.Stderr, "actions: export-env, ipv6-only, security-env") + fmt.Fprintln(os.Stderr, "actions: export-env, ipv6-only, security-env, detect-hostname") fmt.Fprintln(os.Stderr, "(also: vespa-deploy, vespa-logfmt)") } } |