forked from EYBlockchain/nightfall_3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
geth-standalone
executable file
·39 lines (36 loc) · 1.33 KB
/
geth-standalone
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#! /bin/bash
# This script will start a private gth blockchain with two miners and two node.
# The two nodes expose ws:// ports on :8546 and :8547
usage()
{
echo "Usage:"
echo " -s or --start; to start a two-node private geth blockchain"
echo " -d or --down; to shut the network down and delete volumes"
echo " -p or --pause; to pause the network (useful if you want the CPU for something else for a bit)"
echo " -u or --unpause; to un-pause the network"
echo " -l or --logs; start logging output"
echo " -h or --help; prints this message"
}
FILE="docker-compose.standalone.geth.yml"
NAME="geth"
# select a Geth or Ganache client
if [ "$1" == "" ]; then
usage
exit 1
fi
case $1 in
-s | --start ) docker-compose -f $FILE -p $NAME up -d
;;
-d | --down ) docker-compose -f $FILE -p $NAME down -v --remove-orphans -t 1
;;
-p | --pause ) docker-compose -f $FILE -p $NAME pause
;;
-u | --unpause ) docker-compose -f $FILE -p $NAME unpause
;;
-l | --logs ) docker-compose -f $FILE -p $NAME logs -f
;;
-h | --help ) usage
;;
* ) usage
exit 1
esac