This commit is contained in:
2024-12-24 13:40:15 +08:00
parent 4a0e19cc8b
commit 17fca60282
28 changed files with 50 additions and 38 deletions

View File

@@ -32,9 +32,9 @@ function Print {
function Quit {
Print killing greatsql ...
mysqladmin shutdown || true
greatsqladmin shutdown || true
while :; do
pkill -f mysqld && Print killing greatsql ... || break
pkill -f greatsqld && Print killing greatsql ... || break
sleep 1
done
Print Container stopped.
@@ -71,7 +71,7 @@ function ImportInitSql {
}
function StartProc {
mysqld &
greatsqld &
PIDS="$PIDS $!"
while sleep 1; do
[ -e $SOCK_FILE ] && break || echo -n .
@@ -88,7 +88,7 @@ function Main {
Init
StartProc
trap "GOT_SIGTERM=1; Print Got SIGTERM ..." SIGTERM
while [ -z "$GOT_SIGTERM" ] && sleep 1; do
while [ -z "$GOT_SIGTERM" ] && sleep 2; do
for pid in $PIDS; do
[ ! -e /proc/$pid ] && Print Unexpected error! && exit
done