Jump to content

Problem in close.sh


Recommended Posts

Hey,

When I use the close.sh command, sometimes it freezes on shutting down db, and even when it says successfully, the server don't shutdown, I could login normally!!

here is my close.sh script

if [ `id -u` = "root" ]; then
	echo "This script must not be run as root" 1>&2
	exit 1
fi

ROOT=$PWD
clear
echo -e "\033[31mWrite nummber of channel (max:4)\033[0m"
read chs
case $chs in 
1*)
	clear
	echo -e "\033[34mStopping Auth\034"
	cd $ROOT/core/auth && sh shutdown.sh
	sleep 2
	echo "Stopping Ch1"
	cd $ROOT/core/ch1/game1 && sh shutdown.sh
	sleep 1
	cd $ROOT/core/ch1/game2 && sh shutdown.sh
	sleep 1
	cd $ROOT/core/ch1/first && sh shutdown.sh
	sleep 2
	echo -e "Stopping Game99"
	cd $ROOT/core/game99 && sh shutdown.sh
	sleep 2
	echo -e "Stopping Database"
	cd $ROOT/core/db && sh shutdown.sh
	sleep 2
	echo -e "\033[31m Server has been closed \033[0m"
;;
2*)
	clear
	echo -e "Stopping Auth"
	cd $ROOT/core/auth && sh shutdown.sh
	sleep 2
	echo "Stopping Ch1"
	cd $ROOT/core/ch1/game1 && sh shutdown.sh
	sleep 1
	cd $ROOT/core/ch1/game2 && sh shutdown.sh
	sleep 1
	cd $ROOT/core/ch1/first && sh shutdown.sh
	sleep 2
	echo "Stopping Ch2"
	cd $ROOT/core/ch2/game1 && sh shutdown.sh
	sleep 1
	cd $ROOT/core/ch2/game2 && sh shutdown.sh
	sleep 1
	cd $ROOT/core/ch2/first && sh shutdown.sh
	sleep 2
	echo -e "Stopping Game99"
	cd $ROOT/core/game99 && sh shutdown.sh
	sleep 2
	echo -e "Stopping Database"
	cd $ROOT/core/db && sh shutdown.sh
	sleep 2
	echo -e "\033[31m Server has been closed \033[0m"
;;
3*)
	clear
	echo -e "Stopping Auth"
	cd $ROOT/core/auth && sh shutdown.sh
	sleep 2
	echo "Ch1 kapatiliyor"
	cd $ROOT/core/ch1/game1 && sh shutdown.sh
	sleep 1
	cd $ROOT/core/ch1/game2 && sh shutdown.sh
	sleep 1
	cd $ROOT/core/ch1/first && sh shutdown.sh
	sleep 2
	echo "Stopping Ch2"
	cd $ROOT/core/ch2/game1 && sh shutdown.sh
	sleep 1
	cd $ROOT/core/ch2/game2 && sh shutdown.sh
	sleep 1
	cd $ROOT/core/ch2/first && sh shutdown.sh
	sleep 2
	echo "Stopping Ch3"
	cd $ROOT/core/ch3/game1 && sh shutdown.sh
	sleep 1
	cd $ROOT/core/ch3/game2 && sh shutdown.sh
	sleep 1
	cd $ROOT/core/ch3/first && sh shutdown.sh
	sleep 2
	echo -e "Stopping Game99"
	cd $ROOT/core/game99 && sh shutdown.sh
	sleep 2
	echo -e "Stopping Database"
	cd $ROOT/core/db && sh shutdown.sh
	sleep 2
	echo -e "\033[31m Server has been closed \033[0m"
;;
4*)
	clear
	echo -e "Stopping Auth"
	cd $ROOT/core/auth && sh shutdown.sh
	sleep 2
	echo "Ch1 kapatiliyor"
	cd $ROOT/core/ch1/game1 && sh shutdown.sh
	sleep 1
	cd $ROOT/core/ch1/game2 && sh shutdown.sh
	sleep 1
	cd $ROOT/core/ch1/first && sh shutdown.sh
	sleep 2
	echo "Stopping Ch2"
	cd $ROOT/core/ch2/game1 && sh shutdown.sh
	sleep 1
	cd $ROOT/core/ch2/game2 && sh shutdown.sh
	sleep 1
	cd $ROOT/core/ch2/first && sh shutdown.sh
	sleep 2
	echo "Stopping Ch3"
	cd $ROOT/core/ch3/game1 && sh shutdown.sh
	sleep 1
	cd $ROOT/core/ch3/game2 && sh shutdown.sh
	sleep 1
	cd $ROOT/core/ch3/first && sh shutdown.sh
	sleep 2
	echo "Stopping Ch4"
	cd $ROOT/core/ch4/game1 && sh shutdown.sh
	sleep 1
	cd $ROOT/core/ch4/game2 && sh shutdown.sh
	sleep 1
	cd $ROOT/core/ch4/first && sh shutdown.sh
	sleep 2
	echo -e "Stopping Game99"
	cd $ROOT/core/game99 && sh shutdown.sh
	sleep 2
	echo -e "Stopping Database"
	cd $ROOT/core/db && sh shutdown.sh
	sleep 2
	echo -e "\033[31m Server has been closed \033[0m"
;;
esac

 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.