re-enable the logfile

This commit is contained in:
Joe
2017-02-07 23:34:55 -06:00
parent 2b094566c8
commit f829028ddf

View File

@@ -4,7 +4,7 @@
testhost=webthink.net
testuser=webmaster@${testhost}
#logfile=~/mailqueryfail.log
logfile=~/checkMailQueryfail.log
mail=$1
hostPart=${mail/*@/}
@@ -39,10 +39,10 @@ EOE
) | expect -f - | grep -e '^5')
if [ -z "${result}" ]
then echo "OK : " $mail >> /dev/null # $logfile
then echo "`date` - OK : " $mail >> $logfile
echo -e "{\"status\":\"ok\"}"
exit 0
else echo $mail ":" $result >> /dev/null # $logfile
else echo "`date` - ERR : " $mail ":" $result >> $logfile
echo -e "{\"status\":\"err\", \"error\":\"Unknown username for this e-mail provider.\"}"
exit 1
fi