Pārlūkot izejas kodu

mysql client

Removed check because is duplicated when connection is checked.
Cristhian Martínez Ochoa 3 gadi atpakaļ
vecāks
revīzija
1e5d3e8d1b
3 mainītis faili ar 1 papildinājumiem un 5 dzēšanām
  1. 1 2
      lib/bkp
  2. 0 1
      lib/general
  3. 0 2
      lib/sites

+ 1 - 2
lib/bkp

@@ -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

+ 0 - 1
lib/general

@@ -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

+ 0 - 2
lib/sites

@@ -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}"