fix(netclient): get only first part of the hostname

If the hostname is full, only take the first part of the name.
This commit is contained in:
Adrien Raffin-Caboisse 2021-11-02 11:58:43 +01:00
parent 15f9a0186f
commit a5b7ca90fc
No known key found for this signature in database
GPG key ID: 7FB60532DEBEAD6A

View file

@ -10,6 +10,7 @@ import (
"os/signal"
"runtime/debug"
"strconv"
"strings"
"syscall"
"github.com/gravitl/netmaker/netclient/command"
@ -30,6 +31,7 @@ func main() {
if err != nil {
hostname = ""
}
hostname = strings.Split(hostname, ".")[0]
cliFlags := []cli.Flag{
&cli.StringFlag{