11 lines
291 B
Bash
Executable File
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
|