arnaucube
arnaucube/blockchainIDsystemPublic Self-hosted repository
blockchainIDsystem/runTmuxTestPeers.sh
runTmuxTestPeers.shRaw
 1SESSION='peersTest'
 2
 3tmux new-session -d -s $SESSION
 4tmux split-window -d -t 0 -v
 5tmux split-window -d -t 0 -h
 6tmux split-window -d -t 0 -v
 7tmux split-window -d -t 2 -v
 8tmux split-window -d -t 4 -h
 9
10tmux send-keys -t 0 'cd peer && go run *.go server 3001 3002' enter
11sleep 2
12tmux send-keys -t 1 "curl -X POST http://127.0.0.1:3002/register -d '{\"address\": \"firstaddress\"}'" enter
13sleep 1
14tmux send-keys -t 1 'cd peer && go run *.go client 3003 3004' enter
15tmux send-keys -t 2 'cd peer && go run *.go client 3005 3006' enter
16tmux send-keys -t 3 'cd peer && go run *.go client 3007 3008' enter
17tmux send-keys -t 4 'cd serverCA && go run *.go' enter
18tmux send-keys -t 5 'cd serverIDsigner && go run *.go' enter
19
20tmux attach