diff --git a/docker-compose.yaml b/docker-compose.yaml index 24af393..30b78ea 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -13,4 +13,4 @@ services: - /dev/net/tun environment: - TZ=Europe/London - # - NEBULA_IP=10.10.100.x/24 + - NEBULA_IP=10.10.100.x/24 diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 40a9956..252eb6d 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -5,11 +5,6 @@ BIN_DIR=/app/linux-${ARCH} DATA_DIR=/etc/nebula HOSTNAME=$(hostname) -if test -z "${NEBULA_IP}"; then - echo 'You did not set a value for the environment variable NEBULA_IP' - exit 1 -fi - if test "${HOSTNAME}" == '__HOSTNAME__'; then echo 'You did not set a hostname for the Docker container' exit 2 @@ -33,5 +28,10 @@ if ! test -f ${DATA_DIR}/host.crt; then fi # ----------------------------------------------------------- +if test -z "${NEBULA_IP}" -o "${NEBULA_IP}" == '10.10.100.x/24'; then + echo 'You did not set a valid value for the environment variable NEBULA_IP' + exit 1 +fi + # Run the platform-specific binary "${BIN_DIR}/nebula" -config ${DATA_DIR}/config.yaml