Do not create clients if CLIENTS env not set

This commit is contained in:
Paul-Christian Volkmer 2023-05-20 21:13:19 +02:00
parent ff6d28d5a2
commit 4ed0d15d2e
2 changed files with 5 additions and 3 deletions

View File

@ -21,5 +21,3 @@ services:
SERVER_HOST: example.com
SERVER_PORT: 51820
NETWORK: 192.168.42.0
CLIENTS: 5

View File

@ -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