Make NEBULA_IP setting more obvious, hopefully

This commit is contained in:
Scott Wallace 2022-03-30 09:55:57 +01:00
parent 67e56a2ead
commit b8050789c8
Signed by: scott
GPG key ID: AA742FDC5AFE2A72
2 changed files with 6 additions and 6 deletions

View file

@ -13,4 +13,4 @@ services:
- /dev/net/tun - /dev/net/tun
environment: environment:
- TZ=Europe/London - TZ=Europe/London
# - NEBULA_IP=10.10.100.x/24 - NEBULA_IP=10.10.100.x/24

View file

@ -5,11 +5,6 @@ BIN_DIR=/app/linux-${ARCH}
DATA_DIR=/etc/nebula DATA_DIR=/etc/nebula
HOSTNAME=$(hostname) 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 if test "${HOSTNAME}" == '__HOSTNAME__'; then
echo 'You did not set a hostname for the Docker container' echo 'You did not set a hostname for the Docker container'
exit 2 exit 2
@ -33,5 +28,10 @@ if ! test -f ${DATA_DIR}/host.crt; then
fi 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 # Run the platform-specific binary
"${BIN_DIR}/nebula" -config ${DATA_DIR}/config.yaml "${BIN_DIR}/nebula" -config ${DATA_DIR}/config.yaml