File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,4 +111,4 @@ that are still running.
111111## ` doNew.sh `
112112
113113This is ascript that you can use to start a new instance of your application from a clean state.
114- This scrip simply invokes ` terminate.sh ` and ` run.sh ` sequentially.
114+ This script simply invokes ` terminate.sh ` and ` run.sh ` sequentially.
Original file line number Diff line number Diff line change @@ -101,12 +101,12 @@ Now you can run:
101101
102102* on Bob:
103103``` shell
104- python teleport-bob .py
104+ python bobTest .py
105105```
106106
107107* on Alice:
108108``` shell
109- python teleport-alice .py
109+ python aliceTest .py
110110```
111111
112112The code assumes you start Bob before starting Alice. Using your knowledge of network programming
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ ./terminate.sh
4+ ./run.sh
Original file line number Diff line number Diff line change @@ -6,10 +6,6 @@ if [ ! -f ~/.simulaqron_pids/simulaqron_network_default.pid ]; then
66 simulaqron start --nodes=Alice,Bob --network-config-file simulaqron_network.json
77fi
88
9- python3 teleport-bob.py &
10- SERVERPID=$!
9+ python3 bobTest.py &
1110sleep 1
12- python3 teleport-alice.py
13-
14- # Kill the server after it was used
15- kill -9 $SERVERPID
11+ python3 aliceTest.py
Original file line number Diff line number Diff line change 11#! /usr/bin/env sh
2- TEST_PIDS=$( ps aux | grep python | grep -E " teleport " | awk {' print $2' })
2+ TEST_PIDS=$( ps aux | grep python | grep -E " Test " | awk {' print $2' })
33if [ " $TEST_PIDS " != " " ]
44then
55 kill -9 $TEST_PIDS
66fi
77
8- simulaqron stop
9-
108# Check if SimulaQron is running
119if [ -f ~ /.simulaqron_pids/simulaqron_network_default.pid ]; then
12- cat $HOME /.simulaqron_pids/simulaqron_network_default.pid | xargs kill -9
10+ if ! simulaqron stop
11+ then
12+ # Kill the process, only if simulaqron could not be stopped gracefully
13+ cat $HOME /.simulaqron_pids/simulaqron_network_default.pid | xargs kill -9
14+ fi
1315fi
1416
You can’t perform that action at this time.
0 commit comments