View Full Version : [TLBB] Cách tắt sever , ai biết chỉ mình với nhỉ
trang2k999
22-09-21, 10:58 PM
ai có scrip hay file stop.sh send mình nhỉ ?
có ai file sh giống mình trong hình không nhỉ ?
<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>
<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>
Sadlove123
23-09-21, 11:22 AM
stop.sh
#!/usr/bin/env bash
cd /home/tlbb/Server
###### stop Login ######
LOGINPID=$(pgrep Login)
kill -9 $LOGINPID
echo " Login is stopping ......"
until
[ "$?" = "1" ]
do
pgrep Login >/dev/null 2>&1
done
echo " Login stoped completely !!!!!!"
###### stop World ######
WORLDPID=$(pgrep World)
kill -9 $WORLDPID
echo " World is stopping ......"
until
[ "$?" = "1" ]
do
pgrep World >/dev/null 2>&1
done
echo " World stoped completely !!!!!!"
###### stop Server ######
touch quitserver.cmd
echo " stopping Server ......"
until
[ "$?" = "1" ]
do
pgrep Server >/dev/null 2>&1
done
echo " Server stoped completely !!!!!!"
###### stop ShareMemory ######
touch exit.cmd
echo " ShareMemroy is saving data ......"
until
[ "$?" = "1" ]
do
pgrep ShareMemory >/dev/null 2>&1
done
echo " ShareMemory stoped completely !!!!!!"
###### Save Var ######
# echo " Var is saving ......"
# python VarTool save
xrun.sh
ulimit -n 65535
if ps aux | grep -i "./ShareMemory" | grep -v grep >/dev/null 2>&1;then
echo " ShareMemory is running !!!!!!"
else
###### start ShareMemory ######
cd /home/tlbb/Server/
./shm clear >/dev/null 2>&1
rm -rf exit.cmd quitserver.cmd
#echo -e "\n"
./shm start >/dev/null 2>&1
#echo -e "\n"
echo " start ShareMemory ......"
#until [ "$STATUS" ]
#FILE=`ls -l -lt /home/tlbb/Server/Log/ShareMemory* | head -n 1 | awk '{print$9}' `
#do
# STATUS=`tail -1 $FILE | grep "Loop...Start" | egrep -vi 'grep|tail' `
#done
sleep 30
echo " ShareMemory started completely !!!!!!"
###### start World ######
cd /home/tlbb/Server/
./World >/dev/null 2>&1 &
echo " start World ......"
sleep 5
echo " World started completely !!!!!!"
###### start Login ######
./Login_fix >/dev/null 2>&1 &
echo " start Login ......"
sleep 1
echo " Login started completely !!!!!!"
###### start Server ######
cd /home/tlbb/Server/
./Server >/dev/null 2>&1 &
echo " start Server ......"
#until
#[ "$?" = "1" ]
#do
# ps aux | grep -i "./Server_fix " | grep -v grep >/dev/null 2>&1
#done
sleep 60
echo " Server started completely !!!!!!"
exit
fi
xstop.sh
###### stop Server ######
cd /home/tlbb/Server && touch quitserver.cmd
echo " stopping Server ......"
until
[ "$?" = "1" ]
do
ps aux | grep -i "./Server -loadscriptonce" | 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_fix ######
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 !!!!!!"
Powered by vBulletin® Version 4.2.0 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.