Skip to content

Commit

Permalink
simulate_network: Run introducer among others
Browse files Browse the repository at this point in the history
  • Loading branch information
rostislav authored and mariano54 committed Nov 15, 2019
1 parent cb333bd commit 20111bc
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/scripts/simulate_network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ python -m src.server.start_timelord &
P2=$!
python -m src.server.start_farmer &
P3=$!
python -m src.server.start_full_node "127.0.0.1" 8002 -f &
python -m src.server.start_introducer &
P4=$!
python -m src.server.start_full_node "127.0.0.1" 8444 -t -u 8222 &
python -m src.server.start_full_node "127.0.0.1" 8002 -f &
P5=$!
python -m src.server.start_full_node "127.0.0.1" 8005 &
python -m src.server.start_full_node "127.0.0.1" 8444 -t -u 8222 &
P6=$!
python -m src.server.start_full_node "127.0.0.1" 8005 &
P7=$!

_term() {
echo "Caught SIGTERM signal, killing all servers."
Expand All @@ -30,10 +32,11 @@ _term() {
kill -TERM "$P4" 2>/dev/null
kill -TERM "$P5" 2>/dev/null
kill -TERM "$P6" 2>/dev/null
kill -TERM "$P7" 2>/dev/null
_kill_servers
}

trap _term SIGTERM
trap _term SIGINT
trap _term INT
wait $P1 $P2 $P3 $P4 $P5 $P6
wait $P1 $P2 $P3 $P4 $P5 $P6 $P7

0 comments on commit 20111bc

Please sign in to comment.