storj/cmd/farmer/entrypoint
2018-08-16 14:03:15 -04:00

19 lines
448 B
Bash
Executable File

#!/bin/sh
set -euo pipefail
# Create a new farmer, if the ID for an existing farmer isn't specified.
if [[ -z $PSID ]]; then
mkdir -p "${PS_DIR}"
# Needs updating for new method of creating certs
#export PSID=$(./piecestore-farmer setup | awk '/created/ { print $2 }')
echo "(DISABLED) Created farmer $PSID"
fi
RUN_PARAMS=''
if [[ -z $CONF_PATH ]]; then
RUN_PARAMS="${RUN_PARAMS} --config ${CONF_PATH}"
fi
exec ./farmer run $RUN_PARAMS