Skip to content
Permalink
Browse files

feat: add quistart script draft

  • Loading branch information...
etienne-napoleone committed Jun 4, 2019
1 parent 4aaa974 commit 366fd575dbab16160d8de7477124fd0013cb4dd7
Showing with 38 additions and 0 deletions.
  1. +38 −0 AWS/private_network/quickstart.sh
@@ -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.
You can’t perform that action at this time.