2018-07-19 20:42:50 +01:00
|
|
|
#!/bin/sh
|
|
|
|
set -euo pipefail
|
|
|
|
|
2018-12-17 16:54:32 +00:00
|
|
|
if [[ ! -d "${CONF_PATH}" ]]; then
|
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
|
|
|
|
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 "$@"
|