소스 검색

Don't use the key if not provided.

Caleb Gasser 3 년 전
부모
커밋
c1ee121427
1개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  1. 6 4
      scripts/netclient-install.sh

+ 6 - 4
scripts/netclient-install.sh

@@ -206,10 +206,12 @@ if [  "${OS}" = "OpenWRT" ]; then
 	EXTRA_ARGS="--daemon=off"
 fi
 
-if [ -z "${NAME}" ]; then
-  ./netclient join -t $KEY $EXTRA_ARGS
-else
-  ./netclient join -t $KEY --name $NAME $EXTRA_ARGS
+if [ "${KEY}" != "nokey" ]; then
+  if [ -z "${NAME}" ]; then
+    ./netclient join -t $KEY $EXTRA_ARGS
+  else
+    ./netclient join -t $KEY --name $NAME $EXTRA_ARGS
+  fi
 fi