github.com/crowdsecurity/crowdsec@v1.6.1/test/instance-db (about) 1 #!/usr/bin/env bash 2 3 #shellcheck disable=SC1007 4 THIS_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) 5 cd "${THIS_DIR}" || exit 1 6 # shellcheck disable=SC1091 7 . ./.environment.sh 8 9 ./bin/assert-crowdsec-not-running 10 11 backend_script="./lib/db/instance-${DB_BACKEND}" 12 13 if [[ ! -x "${backend_script}" ]]; then 14 echo "unknown database '${DB_BACKEND}'" >&2 15 exit 1 16 fi 17 18 exec "${backend_script}" "$@"