-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnodes.sh
executable file
·92 lines (80 loc) · 1.87 KB
/
nodes.sh
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/bash
source const.sh
function startNodeIcon() {
cd $ICON_DOCKER_PATH
make ibc-ready
}
function startNodeArchway() {
cd $WASM_DOCKER_PATH
docker compose up -d
}
function startNodeNeutron() {
cd $WASM_DOCKER_PATH
make start-docker-container
}
function stopNodeIcon() {
cd $ICON_DOCKER_PATH
make stop
}
function stopNodeArchway() {
cd $WASM_DOCKER_PATH
docker compose down
}
function stopNodeNeutron() {
cd $WASM_DOCKER_PATH
make stop-docker-container
}
function startBothNodes() {
startNodeIcon
startNodeArchway
}
function stopBothNodes() {
stopNodeIcon
stopNodeArchway
}
function usage() {
echo "Script to run Icon and Wasm Nodes"
echo
echo "Usage: "
echo " ./nodes.sh icon-node-start : Start BTP enabled icon local node"
echo " ./nodes.sh archway-node-start : Start archway local node"
echo " ./nodes.sh neutron-node-start : Start neutron local node"
echo " ./nodes.sh icon-node-stop : Stop BTP enabled icon local node"
echo " ./nodes.sh archway-node-stop : Stop archway local node"
echo " ./nodes.sh neutron-node-stop : Stop neutron local node"
echo " ./nodes.sh start-all : Start icon and archway local nodes"
echo " ./nodes.sh close-all : Stop icon and archway local nodes"
}
if [ $# -eq 1 ]; then
echo "Script to run Icon and Wasm Nodes"
CMD=$1
fi
case "$CMD" in
icon-node-start )
startNodeIcon
;;
archway-node-start )
startNodeArchway
;;
neutron-node-start )
startNodeNeutron
;;
icon-node-stop )
startNodeIcon
;;
archway-node-stop )
startNodeArchway
;;
neutron-node-stop )
stopNodeNeutron
;;
start-all )
startBothNodes
;;
close-all )
stopBothNodes
;;
* )
echo "Error: unknown command: $CMD"
usage
esac