storj/cmd/storagenode/entrypoint
aligeti 09da23737a
rename farmers to storagenode (#275)
* rename farmers to storagenode

* review changes

* merge conflicts
2018-08-24 21:52:58 -04:00

19 lines
386 B
Bash
Executable File

#!/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 "$@"