2018-07-19 20:42:50 +01:00
|
|
|
#!/bin/sh
|
|
|
|
set -euo pipefail
|
|
|
|
|
2018-12-21 16:56:57 +00:00
|
|
|
if [[ ! -f "${CONF_PATH}/config.yaml" ]]; then
|
2019-01-12 03:47:18 +00:00
|
|
|
if [[ -n "${CA_DIFFICULTY:-}" ]]; then
|
2019-01-10 14:23:33 +00:00
|
|
|
SETUP_PARAMS="--ca.difficulty ${CA_DIFFICULTY}"
|
|
|
|
fi
|
2018-09-07 20:46:08 +01:00
|
|
|
./storagenode setup
|
2018-08-23 16:48:03 +01:00
|
|
|
fi
|
2018-08-16 19:03:15 +01:00
|
|
|
|
2018-12-17 16:54:32 +00:00
|
|
|
RUN_PARAMS="${RUN_PARAMS:-} --config-dir ${CONF_PATH}"
|
2018-09-07 20:46:08 +01:00
|
|
|
|
2019-01-15 15:43:10 +00:00
|
|
|
export STORJ_SERVER_ADDRESS="${STORJ_SERVER_ADDRESS:-$(hostname -i):7777}"
|
2019-01-03 19:54:27 +00:00
|
|
|
|
2018-08-23 16:48:03 +01:00
|
|
|
if [ -n "${SATELLITE_ADDR:-}" ]; then
|
|
|
|
RUN_PARAMS="${RUN_PARAMS} --kademlia.bootstrap-addr $SATELLITE_ADDR"
|
2018-08-16 19:03:15 +01:00
|
|
|
fi
|
|
|
|
|
2018-08-25 02:52:58 +01:00
|
|
|
exec ./storagenode run $RUN_PARAMS "$@"
|