tmux_sessions.sh 982 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh
  2. # Start a tmux session of four taud nodes, and four tau clients.
  3. set -e
  4. tmux new-session -s "taud" -n "taud" -d
  5. tmux send-keys "../../../taud --config seed.toml --skip-dag-sync" Enter && sleep 1
  6. tmux split-window -h
  7. tmux send-keys "../../../taud --config taud_full_node1.toml --skip-dag-sync" Enter && sleep 1
  8. tmux split-window -h
  9. tmux send-keys "../../../taud --config taud_full_node2.toml" Enter
  10. tmux select-pane -t 0
  11. tmux split-window -v
  12. tmux send-keys "../../../taud --config taud_full_node3.toml" Enter
  13. tmux select-pane -t 2
  14. tmux split-window -v
  15. tmux send-keys "../../../taud --config taud_full_node4.toml" Enter
  16. if [ -z "$1" ]; then
  17. tmux new-window -t "taud:1" -n "tau"
  18. tmux send-keys "tau -e 127.0.0.1:23341" Enter
  19. tmux split-window -v
  20. tmux send-keys "tau -e 127.0.0.1:23342" Enter
  21. tmux split-window -h
  22. tmux send-keys "tau -e 127.0.0.1:23343" Enter
  23. tmux select-pane -t 0
  24. tmux split-window -h
  25. tmux send-keys "tau -e 127.0.0.1:23344" Enter
  26. fi
  27. tmux attach