You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
add in kill by pid
This commit is contained in:
@ -296,6 +296,25 @@ fi
|
|||||||
[ -f /etc/sysconfig/mysql ] && . /etc/sysconfig/mysql
|
[ -f /etc/sysconfig/mysql ] && . /etc/sysconfig/mysql
|
||||||
[ -f /etc/conf.d/mysql ] && . /etc/conf.d/mysql
|
[ -f /etc/conf.d/mysql ] && . /etc/conf.d/mysql
|
||||||
|
|
||||||
|
kill_by_pid() {
|
||||||
|
# let's see if we can kill the 2 mysql procs by hand
|
||||||
|
# get the our mysql from ps
|
||||||
|
eval $(ps -ef | grep "$INFINIDB_INSTALL_DIR/mysql//sbin/mysqld" | grep -v grep | head -1 | awk '{printf "pid=%d\n", $2}')
|
||||||
|
|
||||||
|
if [ -n "$pid" ]; then
|
||||||
|
ppid=$(ps -o ppid= -p $pid)
|
||||||
|
$SUDO kill -9 $ppid
|
||||||
|
kill -9 $ppid
|
||||||
|
sleep 1
|
||||||
|
$SUDO kill -9 $pid
|
||||||
|
kill -9 $pid
|
||||||
|
echo $echo_n "Force shutting down (no/bad pid file)"
|
||||||
|
log_success_msg
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
case "$mode" in
|
case "$mode" in
|
||||||
'start')
|
'start')
|
||||||
# Start daemon
|
# Start daemon
|
||||||
@ -349,6 +368,7 @@ case "$mode" in
|
|||||||
fi
|
fi
|
||||||
exit $return_value
|
exit $return_value
|
||||||
else
|
else
|
||||||
|
kill_by_pid
|
||||||
log_failure_msg "MySQL server PID file could not be found!"
|
log_failure_msg "MySQL server PID file could not be found!"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
Reference in New Issue
Block a user