浏览代码

* Corregir errores

Guzmán Castanedo Villalba 5 年之前
父节点
当前提交
dc2c701dfb
共有 1 个文件被更改,包括 2 次插入2 次删除
  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