diff --git a/entry.sh b/entry.sh index 722634f8..877385d1 100755 --- a/entry.sh +++ b/entry.sh @@ -23,4 +23,13 @@ fi export DBUS_SYSTEM_BUS_ADDRESS="unix:path=/mnt/root/run/dbus/system_bus_socket" +# Include self-signed CAs, should they exist +if [ ! -z "${BALENA_ROOT_CA}" ]; then + if [ ! -e '/etc/ssl/certs/balenaRootCA.pem' ]; then + mkdir -p /usr/local/share/ca-certificates + echo "${BALENA_ROOT_CA}" > /usr/local/share/ca-certificates/balenaRootCA.crt + update-ca-certificates + fi +fi + exec node /usr/src/app/dist/app.js