Explorar o código

fixing script

afeiszli %!s(int64=3) %!d(string=hai) anos
pai
achega
a52656ce98
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      scripts/netclient-install.sh

+ 6 - 0
scripts/netclient-install.sh

@@ -106,5 +106,11 @@ else
 	wget -nv -O netclient https://github.com/gravitl/netmaker/releases/download/latest/$dist
 	wget -nv -O netclient https://github.com/gravitl/netmaker/releases/download/latest/$dist
 fi
 fi
 chmod +x netclient
 chmod +x netclient
+
+if [ -z "${NAME}" ]; then
+sudo ./netclient join -t $KEY
+else
 sudo ./netclient join -t $KEY --name $NAME
 sudo ./netclient join -t $KEY --name $NAME
+fi
+
 rm -f netclient
 rm -f netclient