Skip to content

Commit

Permalink
feat: add quistart script draft
Browse files Browse the repository at this point in the history
  • Loading branch information
etienne-napoleone committed Jun 4, 2019
1 parent 4aaa974 commit 366fd57
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions AWS/private_network/quickstart.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#/usr/bin/env bash

# check if the network name was specified
if [ ! -z $1 ]
then
# if yes, check that there is a corresponsing genesis
genesis_path="${HOME}/.puppeth/${1}"
if [ -f "$genesis_path" ]
then
echo "! | Found a genesis for network ${1}"

else
echo "x | No genesis found with that network name"
echo " | Please create one with puppeth"
exit 1
fi
else
echo "x | Please provide a network name"
exit 1
fi

# create the container with the right startup options
echo " | Creating your masternode container"
# ask for private key
echo "? | Please enter your masternode coinbase private key"
private_key=$(read -sp "> | "); echo ""

exit
# this is not correct yet
docker create \
--name "${1}01" \
-e IDENTITY="${1}01" \
-e PRIVATE_KEY="${private_key}" \
-e NETWORK_ID="$(jq .genesis.config.chainId ${genesis_path})" \
-e VERBOSITY=3 \
-e GENESIS_PATH="/tomochain/genesis.json" \
-v ${genesis_path}:/tomochain/genesis.json \
tomochain/node:stable

0 comments on commit 366fd57

Please sign in to comment.