-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_local.sh
More file actions
69 lines (62 loc) · 1.09 KB
/
Copy pathrun_local.sh
File metadata and controls
69 lines (62 loc) · 1.09 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
function trap_ctrlc ()
{
# perform cleanup here
echo "Ctrl-C caught...performing clean up"
echo "Doing cleanup"
kill -9 ${PID1}
kill -9 ${PID2}
kill -9 ${PID5001}
kill -9 ${PID5002}
kill -9 ${PID5003}
kill -9 ${PID5004}
kill -9 ${PID5005}
kill -9 ${PID5006}
kill -9 ${PID5007}
kill -9 ${PID5008}
# exit shell script with error code 2
# if omitted, shell script will continue execution
exit 2
}
trap "trap_ctrlc" 2
cd frontend
echo "before go through"
python run.py &
PID1=$!
echo ${PID1}
echo "manage app"
cd ..
cd manager_app
python run.py &
PID2=$!
echo ${PID2}
cd ..
cd auto_scaler
python run.py &
cd ..
cd memcache
flask run --port 5001 &
PID5001=$!
echo ${PID5001}
flask run --port 5002 &
PID5002=$!
echo ${PID5002}
flask run --port 5003 &
PID5003=$!
echo ${PID5003}
flask run --port 5004 &
PID5004=$!
echo ${PID5004}
flask run --port 5005 &
PID5005=$!
echo ${PID5005}
flask run --port 5006 &
PID5006=$!
echo ${PID5006}
flask run --port 5007 &
PID5007=$!
echo ${PID5007}
flask run --port 5008 &
PID5008=$!
echo ${PID5008}
wait