Merge pull request #353 from SekoiaLab/feat/change-default-hostname

Feat/change default hostname
This commit is contained in:
dcarns 2021-10-15 17:52:02 -04:00 committed by GitHub
commit da8ed89e55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,6 +26,11 @@ func main() {
app.Usage = "Netmaker's netclient agent and CLI. Used to perform interactions with Netmaker server and set local WireGuard config."
app.Version = "v0.8.3"
hostname, err := os.Hostname()
if err != nil {
hostname = ""
}
cliFlags := []cli.Flag{
&cli.StringFlag{
Name: "network",
@ -91,7 +96,7 @@ func main() {
&cli.StringFlag{
Name: "name",
EnvVars: []string{"NETCLIENT_NAME"},
Value: "",
Value: hostname,
Usage: "Identifiable name for machine within Netmaker network.",
},
&cli.StringFlag{