mirror of
				https://github.com/pcvolkmer/docker-wireguard-boringtun.git
				synced 2025-11-04 06:06:11 +00:00 
			
		
		
		
	Do not create clients if CLIENTS env not set
This commit is contained in:
		@@ -21,5 +21,3 @@ services:
 | 
			
		||||
      SERVER_HOST: example.com
 | 
			
		||||
      SERVER_PORT: 51820
 | 
			
		||||
      NETWORK: 192.168.42.0
 | 
			
		||||
      CLIENTS: 5
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -53,6 +53,10 @@ else
 | 
			
		||||
  echo " - Do not forward all traffic"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [[ -z $CLIENTS ]]; then
 | 
			
		||||
  CLIENTS=0
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if (( $CLIENTS > 240 )); then
 | 
			
		||||
  CLIENTS=240
 | 
			
		||||
fi
 | 
			
		||||
@@ -140,4 +144,4 @@ EOF
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
# Create dnsmasq hosts file
 | 
			
		||||
/scripts/hosts.sh $NETWORK $NETWORK6
 | 
			
		||||
/scripts/hosts.sh $NETWORK $NETWORK6
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user