| 1 | #!/usr/bin/env bash |
| 2 | set -eux -o pipefail |
| 3 | |
| 4 | # run any docker entrypoint script from /docker-entrypoint.d/ if exists |
| 5 | # (e.g. for ganesha) and then exec "$@" (e.g. saunafs-tests) |
| 6 | if [ -d /healthcheck.d/ ]; then |
| 7 | for f in $(find /healthcheck.d/ -name '*.sh' -print | sort -n); do |
| 8 | [ -f "${f}" ] || continue |
| 9 | echo "Running healthcheck script ${f}" |
| 10 | # shellcheck disable=SC1090 |
| 11 | . "${f}" |
| 12 | done |
| 13 | fi |
| 14 | exec "$@" |