tmux_sessions.sh 735 B

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. set -e
  3. # Start a tmux session with two mining and a non-mining darkfid nodes.
  4. # Additionally, start two minerd daemons.
  5. if [ "$1" = "-vv" ]; then
  6. verbose="-vv"
  7. shift
  8. else
  9. verbose=""
  10. fi
  11. tmux new-session -d
  12. tmux send-keys "../../../minerd ${verbose} -c minerd0.toml" Enter
  13. sleep 1
  14. tmux split-window -v
  15. tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid0.toml" Enter
  16. sleep 2
  17. tmux new-window
  18. tmux send-keys "../../../minerd ${verbose} -c minerd1.toml" Enter
  19. sleep 1
  20. tmux split-window -v
  21. tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid1.toml" Enter
  22. sleep 2
  23. tmux new-window
  24. tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid2.toml" Enter
  25. tmux attach