mysql client

Removed check because is duplicated when connection is checked.
This commit is contained in:
Cristhian Martínez Ochoa 2022-05-28 16:43:34 -06:00
parent 4c3360e4ed
commit 1e5d3e8d1b
3 changed files with 1 additions and 5 deletions

View file

@ -83,7 +83,7 @@ bkp_local_db() {
exit 1
else
wp_conf_retrieve $wp true true $subfolder
[[ $wp_dbhost == "localhost" ]] && check_for_mysql || check_for_mysql_client
[[ $wp_dbhost == "localhost" ]] && check_for_mysql
[[ -n $subfolder ]] && local subname=$(echo $subfolder | sed "s/\//_/g")
fi
@ -121,7 +121,6 @@ bkp_local_db() {
local checkdbname=$(sudo mysqlshow --user=admin -p$ADMIN_PASS | grep -ow $dbname)
else
external_db_parse
check_for_mysql_client
if [[ $(check_mysql_connection $extdb_url $extdb_port $extdb_user $extdb_pass) != "true" ]]; then
echo "${red}[ERROR] Cannot connect with your External Database!${end}"
exit 1

View file

@ -368,7 +368,6 @@ external_db_parse() {
return
fi
check_for_mysql_client
if [[ $(check_mysql_connection $url $port $user $pass) != "true" ]]; then
echo "${red}[ERROR] Cannot connect with your External Database!${end}"
return

View file

@ -185,7 +185,6 @@ wpinstall() {
# Check for MySQL Connection
if [[ $setupmysql == [yY] ]]; then
check_for_mysql_client
echo "${blu}"
if [[ $dbhost != "localhost" && ( $type == [135] && ( -z $dburoot || -z $dbproot )) ]]; then
@ -488,7 +487,6 @@ db_delete() {
# Example: db_delete $domain $subfolder
wp_conf_retrieve $1 true false $2
[[ -z $wp_config ]] && return
[[ $wp_dbhost != "localhost" ]] && check_for_mysql_client
if [[ -z $wp_dbhost || -z $wp_dbname || -z $wp_dbuser ]]; then
echo "${red}[ERROR] Database${blu} ${1}${2} ${red}cannot be deleted! ${dim}(WP configuration corrupted)${end}"