Update the entrypoint

This commit is contained in:
Scott Wallace 2022-03-29 18:50:48 +01:00
parent 393b149209
commit 66b22a64f8
Signed by: scott
GPG key ID: AA742FDC5AFE2A72

View file

@ -1,4 +1,19 @@
#!/bin/sh #!/bin/sh
ARCH=$(uname -m)
BIN_DIR=/app/linux-${ARCH}
DATA_DIR=/etc/nebula
# --------------------- TESTING ONLY ------------------------
# Build certs if they don't exist
if ! test -f ${DATA_DIR}/ca.key; then
cd ${DATA_DIR} || exit 1
"${BIN_DIR}/nebula-cert" ca -name "Infranet"
"${BIN_DIR}/nebula-cert" sign -name "lighthouse" -ip "10.10.100.1/24"
mv lighthouse.crt host.crt
mv lighthouse.key host.key
fi
# -----------------------------------------------------------
# Run the platform-specific binary # Run the platform-specific binary
"/app/linux-$(uname -m)/nebula" "${BIN_DIR}/nebula" -config ${DATA_DIR}/config.yaml