-
Notifications
You must be signed in to change notification settings - Fork 2
/
stop.sh
51 lines (43 loc) · 1.22 KB
/
stop.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
###### stop Server ######
cd /home/tlbb/Server && touch quitserver.cmd
echo " stopping Server ......"
until
[ "$?" = "1" ]
do
ps aux | grep -i "./Server " | grep -v grep >/dev/null 2>&1
done
echo " Server stoped completely !!!!!!"
###### stop Login ######
LOGINPID=`ps aux | grep "./Login" | grep -v grep | awk '{print $2}'`
kill -9 $LOGINPID
echo " Login is stopping ......"
until
[ "$?" = "1" ]
do
ps aux | grep -i "./Login" | grep -v grep >/dev/null 2>&1
done
echo " Login stoped completely !!!!!!"
###### stop World ######
WORLDPID=`ps aux | grep -i "./World" | grep -v grep | awk '{print $2}'`
kill -9 $WORLDPID
echo " World is stopping ......"
until
[ "$?" = "1" ]
do
ps aux | grep -i "./World" | grep -v grep >/dev/null 2>&1
done
echo " World stoped completely !!!!!!"
###### stop ShareMemory ######
cd /home/tlbb/Server/ && touch exit.cmd
echo " ShareMemroy is saving data ......"
until
[ "$?" = "1" ]
do
ps aux | grep -i "./ShareMemory" | grep -v grep >/dev/null 2>&1
done
echo " ShareMemory stoped completely !!!!!!"
###### transfer logs ######
#DIR=`date +%Y%m%d-%H%M`
#mkdir -p /home/tlbb/logbak/$DIR
#mv /home/tlbb/Server/Log/* /home/tlbb/logbak/$DIR
#echo " log transfer to "/home/tlbb/logbak/" completely !!!!!!"