Explorar el Código

* Corregir errores

Guzmán Castanedo Villalba hace 5 años
padre
commit
dc2c701dfb
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      check-sites

+ 2 - 2
check-sites

@@ -168,13 +168,13 @@ for hostname in ${hostnames[@]};do
 	checkHostname $hostname
 	if [ $? -ne 0 ];then
 		echo -en "* \"$hostname\"\tNO ESTÁ DISPONIBLE.\n"
-		hostnamesFail=$hostnameFail"* ""$hostname"" NO ESTÁ DISPONIBLE.\n"
+		hostnamesFail=$hostnamesFail"* ""$hostname"" NO ESTÁ DISPONIBLE.\n"
 	else
 		echo -en "* \"$hostname\"\t ESTÁ DISPONIBLE.\n"
 	fi
 done
 
-if [ ! -z $hostnamesFail ] && [ $email = true ];then
+if [ ! -z "$hostnamesFail" ] && [ $email = true ];then
 	echo -en "Enviando informe por email a \$TO..."
 	message="Envío automático de "$(basename $0)".\nEl sistema presenta Virtual Hosts NO DISPONIBLES.\n""$hostnamesFail""\nCOMPRUEBE QUE EL SERVIDOR.\n"
 	sendEmail