diff --git a/images/commons/lagoon/entrypoints.bash b/images/commons/lagoon/entrypoints.bash index 8c07b2142..eba5e54de 100755 --- a/images/commons/lagoon/entrypoints.bash +++ b/images/commons/lagoon/entrypoints.bash @@ -12,4 +12,11 @@ if [ -d /lagoon/entrypoints ]; then unset i fi -exec "$@" \ No newline at end of file +# If the image provides a native entrypoint that can, or should, be run after the lagoon endpoints are set, it's path can be +# set in the APPEND_NATIVE_ENTRYPOINT variable. +if [ ! -z "${APPEND_NATIVE_ENTRYPOINT+x}" ]; then + echo "running defined endpoint" + . $APPEND_NATIVE_ENTRYPOINT +fi + +exec "$@" diff --git a/images/commons/lagoon/entrypoints.sh b/images/commons/lagoon/entrypoints.sh index af9738e4c..c7166bebd 100755 --- a/images/commons/lagoon/entrypoints.sh +++ b/images/commons/lagoon/entrypoints.sh @@ -14,7 +14,7 @@ fi # If the image provides a native entrypoint that can, or should, be run after the lagoon endpoints are set, it's path can be # set in the APPEND_NATIVE_ENTRYPOINT variable. -if [ -n "$APPEND_NATIVE_ENTRYPOINT" ] && [ -f $APPEND_NATIVE_ENTRYPOINT ]; then +if [ ! -z "${APPEND_NATIVE_ENTRYPOINT+x}" ]; then echo "running defined endpoint" . $APPEND_NATIVE_ENTRYPOINT fi