storj/cmd/farmer/entrypoint

11 lines
291 B
Plaintext
Raw Normal View History

#!/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}"
export PSID=$(./piecestore-farmer create | awk '/created/ { print $2 }')
echo "Created farmer $PSID"
fi
exec ./piecestore-farmer start $PSID