mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-10 23:24:32 +08:00
Merge pull request #353 from SekoiaLab/feat/change-default-hostname
Feat/change default hostname
This commit is contained in:
commit
da8ed89e55
1 changed files with 6 additions and 1 deletions
|
@ -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{
|
||||
|
|
Loading…
Add table
Reference in a new issue