From b8050789c8c4f3507f83daa97bc31caf3177b1f7 Mon Sep 17 00:00:00 2001 From: Scott Wallace Date: Wed, 30 Mar 2022 09:55:57 +0100 Subject: [PATCH] Make NEBULA_IP setting more obvious, hopefully --- docker-compose.yaml | 2 +- docker-entrypoint.sh | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) 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