2018-07-19 20:42:50 +01:00
|
|
|
#!/bin/sh
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
# Create a new farmer, if the ID for an existing farmer isn't specified.
|
2018-08-09 17:22:39 +01:00
|
|
|
if [[ -z $PSID ]]; then
|
2018-07-19 20:42:50 +01:00
|
|
|
mkdir -p "${PS_DIR}"
|
2018-08-16 19:03:15 +01:00
|
|
|
# Needs updating for new method of creating certs
|
|
|
|
#export PSID=$(./piecestore-farmer setup | awk '/created/ { print $2 }')
|
|
|
|
echo "(DISABLED) Created farmer $PSID"
|
2018-07-19 20:42:50 +01:00
|
|
|
fi
|
2018-08-16 19:03:15 +01:00
|
|
|
|
|
|
|
RUN_PARAMS=''
|
|
|
|
|
|
|
|
if [[ -z $CONF_PATH ]]; then
|
|
|
|
RUN_PARAMS="${RUN_PARAMS} --config ${CONF_PATH}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
exec ./farmer run $RUN_PARAMS
|