storj/cmd/piecestore-farmer/entrypoint
2018-08-09 12:22:39 -04:00

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