-
Notifications
You must be signed in to change notification settings - Fork 1
/
stop_test_stack.sh
executable file
·57 lines (45 loc) · 1.2 KB
/
stop_test_stack.sh
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
#!/usr/bin/env bash
# defaults
SCREENID="chat-room-services"
ENV=""
# directory
BINDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $BINDIR
cd ../
DIR=`pwd`
# redis directory
cd ../../vendor/redis
REDISDIR=`pwd`
cd $DIR
echo "Stop testing whisk!"
# proxy
echo "Stop the proxy on screen 1"
CMD="screen -S $SCREENID -p1 -X stuff \$'\03 cd $DIR \03'"
eval $CMD
# web
echo "Stop the web-0 service on screen 2"
CMD="screen -S $SCREENID -p2 -X stuff \$'\03 cd $DIR/components \03'"
eval $CMD
echo "Stop the web-1 service on screen 3"
CMD="screen -S $SCREENID -p3 -X stuff \$'\03 cd $DIR/components \03'"
eval $CMD
# websocket
echo "Stop the ws-0 service on screen 4"
CMD="screen -S $SCREENID -p4 -X stuff \$'\03 cd $DIR/components \03'"
eval $CMD
echo "Stop the ws-1 service on screen 5"
CMD="screen -S $SCREENID -p5 -X stuff \$'\03 cd $DIR/components \03'"
eval $CMD
# worker
echo "Stop the worker on screen 6"
CMD="screen -S $SCREENID -p6 -X stuff \$'\03 cd $DIR/components \03'"
eval $CMD
# stop redis
echo "Stop redis on screen 7"
CMD="screen -S $SCREENID -p7 -X stuff \$'\03 cd $REDISDIR && \03'"
eval $CMD
# stop screen
echo "Stop the screen session"
CMD="screen -X -S $SCREENID quit"
eval $CMD
echo "Done."