Fix error: proof root password if mysql is installed and running.

This commit is contained in:
Christoph 2018-02-20 01:08:30 +01:00
parent fb5b7bafab
commit f5cd8578cf

View File

@ -2,7 +2,6 @@
_backup_date="$(date +"%Y-%m-%d-%H%M")"
#_MYSQL_VERSION=5.6.26
_MYSQL_VERSION=5.7.20
_MYSQL_SRC_BASE_DIR=$(dirname $(realpath $0))
@ -18,7 +17,6 @@ _MYSQL_GROUP=mysql
_DISTRIBUTION=Debian
#_VSERVER_GUEST=ja
_VSERVER_GUEST=nein
_required_debian_packages="libevent-dev
@ -30,6 +28,7 @@ _required_debian_packages="libevent-dev
libpcre3-dev
default-jdk"
_CRONTAB_BAKUP_FILE="$(mktemp)"
## - Let make use multiple cores (-j<number of cores +1>)
@ -406,7 +405,7 @@ do
echo -e "\n\t\033[33m\033[1mPassworteingaben sind nicht identisch!\033[m\n"
else
if $UPDATE_MYSQL ; then
if $(pgrep mysqld_safe > /dev/null 2>&1) ; then
if $(pgrep mysqld_safe > /dev/null 2>&1) || $(pgrep mysqld > /dev/null 2>&1); then
if $(mysql --user="root" --password="$_MYSQL_ROOT_PW_1" -N -s -e 'quit' > /dev/null 2>&1) ; then
MYSQL_ROOT_PW=$_MYSQL_ROOT_PW_1
else
@ -683,8 +682,8 @@ echo "## - MySQL-Gruppe..............: $MYSQL_GROUP" >> ${logdir}/main.log
echo "## - " >> ${logdir}/main.log
echo "## - Symlink Installationsverz.: $SYMLINK_INSTALL_DIR" >> ${logdir}/main.log
echo "## - Symlink Datenverzeichnis..: $SYMLINK_DATA_DIR" >> ${logdir}/main.log
echo "## - " >> ${logdir}/main.log
echo "" >> ${logdir}/main.log
echo "## -" >> ${logdir}/main.log
echo "## -" >> ${logdir}/main.log
echo "## - Systemd Unterstützung.....: $SYSTEMD_EXISTS" >> ${logdir}/main.log
if $INSTALL_SYSTEMD_SERVICE ; then
echo "## - Starmethode...............: Systemd Service" >> ${logdir}/main.log