Fixing Docker entrypoint for storage node (#212)

This commit is contained in:
Philip Hutchins 2018-08-09 12:22:39 -04:00 committed by GitHub
parent 3644d77b45
commit 1f7d77ae69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,15 +2,9 @@
set -euo pipefail
# Create a new farmer, if the ID for an existing farmer isn't specified.
if [ -z "${PSID}" ]; then
if [[ -z $PSID ]]; then
mkdir -p "${PS_DIR}"
export PSID=$(./piecestore-farmer create \
--pieceStoreHost=${PUBLIC_IP} \
--pieceStorePort=${RPC_PORT} \
--kademliaPort=${KAD_PORT} \
--kademliaHost=${KAD_HOST} \
--kademliaListenPort=${KAD_LISTEN_PORT} \
--dir=${PS_DIR} | awk '/created/ { print $2 }')
export PSID=$(./piecestore-farmer create | awk '/created/ { print $2 }')
echo "Created farmer $PSID"
fi
exec ./piecestore-farmer start $PSID