forked from Proxihox/Networks_Hackathon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·26 lines (20 loc) · 682 Bytes
/
test.sh
File metadata and controls
executable file
·26 lines (20 loc) · 682 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
PYTHON_SCRIPT_1="https_server/server.py"
PYTHON_SCRIPT_2="tcp_server/server.py"
PYTHON_SCRIPT_3="client/solution.py"
echo "............................. Running https_server/server.py ......................."
python3 "$PYTHON_SCRIPT_1" &
sleep 2
echo "............................. Running tcp_server/server.py ........................."
python3 "$PYTHON_SCRIPT_2" &
sleep 2
echo "............................. Running solution.py ..........................................."
python3 "$PYTHON_SCRIPT_3"
cleanup() {
echo "Cleanup started."
kill -9 $(lsof -t -i :5000)
kill -9 $(lsof -t -i :65432)
echo "Cleanup completed."
}
trap cleanup EXIT
wait