install_mysql.sh: if stopping mysqld failed, check if mysl processes are running.
This commit is contained in:
parent
1f5ebf7d22
commit
00192cc9ca
@ -5630,22 +5630,61 @@ if $UPDATE_MYSQL && ! $PARALLEL_INSTALLATION ; then
|
||||
echo "## - Stoppe MySQL Datenbankserver" >> ${logdir}/main.log
|
||||
echo "## -" >> ${logdir}/main.log
|
||||
if $INSTALL_SYSTEMD_SERVICE ; then
|
||||
|
||||
_found_mysql_processes=false
|
||||
|
||||
echo "systemctl stop \"$MYSQL_SERVICE_FILE\"" >> ${logdir}/main.log
|
||||
systemctl stop "$MYSQL_SERVICE_FILE" >> ${logdir}/main.log 2>&1
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo_ok
|
||||
else
|
||||
echo_failed
|
||||
error Konnte MySQL Datenbankserver nicht stoppen..
|
||||
|
||||
echononl "continue anyway [yes/no]: "
|
||||
read OK
|
||||
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
|
||||
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
|
||||
echononl "Wrong entry! - repeat [yes/nno]: "
|
||||
_pid_string="${MYSQL_CUR_DISTRIBUTION,,}-${CURRENT_VERSION}/bin/(mysqld_safe |mysqld )"
|
||||
PIDS="$(ps aux | grep -E "$_pid_string" | grep -v grep | awk '{print$2}')"
|
||||
|
||||
if [[ "X${PIDS}X" != "XX" ]];then
|
||||
|
||||
_found_mysql_processes=true
|
||||
echo_failed
|
||||
|
||||
error "Konnte MySQL Datenbankserver nicht stoppen - Some old mysql processs seams to be running\n\n \\033[1mStop MySQL manually ! \033[m"
|
||||
|
||||
echononl "continue anyway [yes/no]: "
|
||||
read OK
|
||||
done
|
||||
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
|
||||
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
|
||||
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
|
||||
echononl "Wrong entry! - repeat [yes/nno]: "
|
||||
read OK
|
||||
done
|
||||
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
|
||||
|
||||
fi
|
||||
|
||||
_pid_string="${MYSQL_INSTALL_DIR}/bin/(mysqld_safe |mysqld )"
|
||||
PIDS="$(ps aux | grep -E "$_pid_string" | grep -v grep | awk '{print$2}')"
|
||||
|
||||
if [[ "X${PIDS}X" != "XX" ]];then
|
||||
|
||||
_found_mysql_processes=true
|
||||
echo_failed
|
||||
|
||||
error "Konnte MySQL Datenbankserver nicht stoppen - Some mysql processs seams to be running\n\n \\033[1mStop MySQL manually ! \033[m"
|
||||
|
||||
echononl "continue anyway [yes/no]: "
|
||||
read OK
|
||||
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
|
||||
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
|
||||
echononl "Wrong entry! - repeat [yes/nno]: "
|
||||
read OK
|
||||
done
|
||||
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
|
||||
|
||||
fi
|
||||
|
||||
if ! $_found_mysql_processes ; then
|
||||
echo_ok
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user