storj/cmd/storagenode/entrypoint

19 lines
386 B
Plaintext
Raw Normal View History

#!/bin/sh
set -euo pipefail
RUN_PARAMS="${RUN_PARAMS:-}"
if [[ -f "${CONF_PATH:-}" ]]; then
RUN_PARAMS="${RUN_PARAMS} --config \"${CONF_PATH}\""
else
if [[ ! -d $HOME/.storj/storagenode ]]; then
./storagenode setup
fi
fi
if [ -n "${SATELLITE_ADDR:-}" ]; then
RUN_PARAMS="${RUN_PARAMS} --kademlia.bootstrap-addr $SATELLITE_ADDR"
fi
exec ./storagenode run $RUN_PARAMS "$@"