Browse Source

setting default roaming

afeiszli 3 years ago
parent
commit
a6868ff848
3 changed files with 4 additions and 4 deletions
  1. 1 1
      docker/Dockerfile-netclient-full
  2. 1 1
      netclient/command/commands.go
  3. 2 2
      netclient/main.go

+ 1 - 1
docker/Dockerfile-netclient-full

@@ -28,7 +28,7 @@ FROM alpine:3.13.6
 
 WORKDIR /root/
 
-RUN apk add --no-cache --update bash libmnl iptables openresolv iproute2
+RUN apk add --no-cache --update bash libmnl gcompat iptables openresolv iproute2
 COPY --from=builder /usr/bin/wireguard-go /usr/bin/wg* /usr/bin/
 COPY --from=builder /app/netclient-app ./netclient
 COPY --from=builder /app/scripts/netclient.sh .

+ 1 - 1
netclient/command/commands.go

@@ -48,7 +48,7 @@ func Join(cfg config.ClientConfig, privateKey string) error {
 		} else {
 			ncutils.PrintLog("success", 0)
 		}
-		if strings.Contains(err.Error(), "ALREADY_INSTALLED") {
+		if err != nil && strings.Contains(err.Error(), "ALREADY_INSTALLED") {
 			ncutils.PrintLog(err.Error(), 0)
 			err = nil
 		}

+ 2 - 2
netclient/main.go

@@ -216,8 +216,8 @@ func main() {
 		&cli.StringFlag{
 			Name:    "roaming",
 			EnvVars: []string{"NETCLIENT_ROAMING"},
-			Value:   "on",
-			Usage:   "Checks for IP changes if 'on'. Ignores if 'off'. On by default.",
+			Value:   "yes",
+			Usage:   "Checks for IP changes if 'yes'. Ignores if 'no'. Yes by default.",
 		},
 	}