tmux_session.sh 572 B

1234567891011121314151617
  1. #!/bin/sh
  2. # Start a tmux session of five ircd nodes, and optionally 5 weechat clients.
  3. set -e
  4. tmux new-session -s "ircd" -n "ircd" -d
  5. tmux send-keys "../../../ircd --config node1.toml" Enter && sleep 1
  6. tmux split-window -h
  7. tmux send-keys "../../../ircd --config node2.toml" Enter && sleep 1
  8. if [ -z "$1" ]; then
  9. tmux new-window -t "ircd:1" -n "weechat"
  10. tmux send-keys "weechat -t -r '/server add node1 127.0.0.1/22022;/connect node1'" Enter
  11. tmux split-window -v
  12. tmux send-keys "weechat -t -r '/server add node2 127.0.0.1/22023;/connect node2'" Enter
  13. fi
  14. tmux attach