storj/cmd/satellite/entrypoint
Egon Elbre 34125fe614 Reduce test CA difficulty (#1010)
* reduce test CA difficulty

* reduce docker ca difficulty
2019-01-10 15:23:33 +01:00

22 lines
501 B
Bash
Executable File

#!/bin/sh
set -euo pipefail
if [[ -n "${API_KEY}" ]]; then
export STORJ_POINTER_DB_AUTH_API_KEY="${API_KEY}"
fi
if [[ ! -f "${CONF_PATH}/config.yaml" ]]; then
if [[ -n "${CA_DIFFICULTY}" ]]; then
SETUP_PARAMS="--ca.difficulty ${CA_DIFFICULTY}"
fi
./satellite setup $SETUP_PARAMS
fi
RUN_PARAMS="${RUN_PARAMS:-} --config-dir ${CONF_PATH}"
if [[ -n "${BOOTSTRAP_ADDR:-}" ]]; then
RUN_PARAMS="${RUN_PARAMS} --kademlia.bootstrap-addr ${BOOTSTRAP_ADDR}"
fi
exec ./satellite run $RUN_PARAMS "$@"