2018-08-23 16:48:03 +01:00
|
|
|
#!/bin/sh
|
|
|
|
set -euo pipefail
|
|
|
|
|
2018-12-21 16:56:57 +00:00
|
|
|
if [[ ! -f "${CONF_PATH}/config.yaml" ]]; then
|
2018-09-07 20:46:08 +01:00
|
|
|
./satellite setup
|
|
|
|
fi
|
|
|
|
|
2018-12-17 16:54:32 +00:00
|
|
|
RUN_PARAMS="${RUN_PARAMS:-} --config-dir ${CONF_PATH}"
|
2018-08-23 16:48:03 +01:00
|
|
|
|
|
|
|
if [[ -n "${API_KEY}" ]]; then
|
2018-09-12 16:02:53 +01:00
|
|
|
export STORJ_POINTER_DB_AUTH_API_KEY="${API_KEY}"
|
2018-08-23 16:48:03 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ -n "${BOOTSTRAP_ADDR:-}" ]]; then
|
|
|
|
RUN_PARAMS="${RUN_PARAMS} --kademlia.bootstrap-addr ${BOOTSTRAP_ADDR}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
exec ./satellite run $RUN_PARAMS "$@"
|