Explorar o código

contrib/localnet/darkfid*: updated tmux scripts

skoupidi %!s(int64=2) %!d(string=hai) anos
pai
achega
3a9455e646

+ 23 - 21
contrib/localnet/darkfid-five-nodes/tmux_sessions.sh

@@ -3,6 +3,8 @@ set -e
 
 # Start a tmux session with five minerd daemons and five darkfid nodes
 
+session=darkfid-five-nodes
+
 if [ "$1" = "-vv" ]; then
 	verbose="-vv"
 	shift
@@ -10,33 +12,33 @@ else
 	verbose=""
 fi
 
-tmux new-session -d
-tmux send-keys "../../../minerd ${verbose} -c minerd0.toml" Enter
+tmux new-session -d -s $session
+tmux send-keys -t $session "../../../minerd ${verbose} -c minerd0.toml" Enter
 sleep 1
-tmux split-window -v
-tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid0.toml" Enter
+tmux split-window -t $session -v
+tmux send-keys -t $session "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid0.toml" Enter
 sleep 2
-tmux new-window
-tmux send-keys "../../../minerd ${verbose} -c minerd1.toml" Enter
+tmux new-window -t $session
+tmux send-keys -t $session "../../../minerd ${verbose} -c minerd1.toml" Enter
 sleep 1
-tmux split-window -v
-tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid1.toml" Enter
+tmux split-window -t $session -v
+tmux send-keys -t $session "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid1.toml" Enter
 sleep 2
-tmux new-window
-tmux send-keys "../../../minerd ${verbose} -c minerd2.toml" Enter
+tmux new-window -t $session
+tmux send-keys -t $session "../../../minerd ${verbose} -c minerd2.toml" Enter
 sleep 1
-tmux split-window -v
-tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid2.toml" Enter
+tmux split-window -t $session -v
+tmux send-keys -t $session "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid2.toml" Enter
 sleep 2
-tmux new-window
-tmux send-keys "../../../minerd ${verbose} -c minerd3.toml" Enter
+tmux new-window -t $session
+tmux send-keys -t $session "../../../minerd ${verbose} -c minerd3.toml" Enter
 sleep 1
-tmux split-window -v
-tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid3.toml" Enter
+tmux split-window -t $session -v
+tmux send-keys -t $session "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid3.toml" Enter
 sleep 2
-tmux new-window
-tmux send-keys "../../../minerd ${verbose} -c minerd4.toml" Enter
+tmux new-window -t $session
+tmux send-keys -t $session "../../../minerd ${verbose} -c minerd4.toml" Enter
 sleep 1
-tmux split-window -v
-tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid4.toml" Enter
-tmux attach
+tmux split-window -t $session -v
+tmux send-keys -t $session "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid4.toml" Enter
+tmux attach -t $session

+ 7 - 5
contrib/localnet/darkfid-single-node/tmux_sessions.sh

@@ -3,6 +3,8 @@ set -e
 
 # Start a tmux session with a minerd daemon and a darkfid node
 
+session=darkfid-single-node
+
 if [ "$1" = "-vv" ]; then
 	verbose="-vv"
 	shift
@@ -10,9 +12,9 @@ else
 	verbose=""
 fi
 
-tmux new-session -d
-tmux send-keys "../../../minerd ${verbose} -c minerd.toml" Enter
+tmux new-session -d -s $session
+tmux send-keys -t $session "../../../minerd ${verbose} -c minerd.toml" Enter
 sleep 1
-tmux split-window -v
-tmux send-keys "LOG_TARGETS='!sled,!net' ../../../darkfid ${verbose} -c darkfid.toml" Enter
-tmux attach
+tmux split-window -t $session -v
+tmux send-keys -t $session "LOG_TARGETS='!sled,!net' ../../../darkfid ${verbose} -c darkfid.toml" Enter
+tmux attach -t $session

+ 2 - 2
contrib/localnet/darkfid-small/tmux_sessions.sh

@@ -1,11 +1,11 @@
 #!/bin/sh
 set -e
 
-session=darkfid-small
-
 # Start a tmux session with two mining and a non-mining darkfid nodes.
 # Additionally, start two minerd daemons.
 
+session=darkfid-small
+
 if [ "$1" = "-vv" ]; then
 	verbose="-vv"
 	shift