Explorar el Código

* Corregir Errores

Guzmán Castanedo Villalba hace 5 años
padre
commit
460152b07a
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. 4 4
      check-virtualhosts

+ 4 - 4
check-virtualhosts

@@ -125,19 +125,19 @@ while true; do
 			;;
 	esac
 done
-if [ -z $to ];then
+if [ -z $to ] && [ $email = true ];then
 	echo -en "WARNING: El envio de correo está desactivado (Compruebe comfiguración).\n"
 	email=false
 fi
-if [ -z $from ];then
+if [ -z $from ] && [ $mail = true ];then
 	echo -en "WARNING: El envio de correo está desactivado (Compruebe comfiguración).\n"
 	email=false
 fi
-if [ -z $password ];then
+if [ -z $password ] && [ $email = true ];then
 	echo -en "WARNING: El envio de correo está desactivado (Compruebe comfiguración).\n"
 	email=false
 fi
-if [ -z $host ];then
+if [ -z $host ] && [ $email = true ];then
 	host=$(echo "$from" | cut -d '@' -f 2)
 	host=$(dig -t MX "$host" +short | cut -d ' ' -f 2 | sed 's/.$//' | head -1)
 	if [ -z $host];then