equal
deleted
inserted
replaced
267 then |
267 then |
268 REGISTRAR=`cat ${WHOIS_TMP} | ${AWK} -F: '/Registrar:/ && $0 != "" { getline; REGISTRAR=substr($0,2,17) } END { print REGISTRAR }'` |
268 REGISTRAR=`cat ${WHOIS_TMP} | ${AWK} -F: '/Registrar:/ && $0 != "" { getline; REGISTRAR=substr($0,2,17) } END { print REGISTRAR }'` |
269 elif [ "${TLDTYPE}" == "jp" ]; |
269 elif [ "${TLDTYPE}" == "jp" ]; |
270 then |
270 then |
271 REGISTRAR=`cat ${WHOIS_TMP} | ${AWK} '/Registrant/ && $2 != "" { REGISTRAR=substr($2,1,17) } END { print REGISTRAR }'` |
271 REGISTRAR=`cat ${WHOIS_TMP} | ${AWK} '/Registrant/ && $2 != "" { REGISTRAR=substr($2,1,17) } END { print REGISTRAR }'` |
|
272 elif [ "${TLDTYPE}" == "cz" ]; |
|
273 then |
|
274 REGISTRAR=`cat ${WHOIS_TMP} | ${AWK} '/registrar:/ && $2 != "" { REGISTRAR=substr($2,1,17) } END { print REGISTRAR }'` |
272 fi |
275 fi |
273 |
276 |
274 # If the Registrar is NULL, then we didn't get any data |
277 # If the Registrar is NULL, then we didn't get any data |
275 if [ "${REGISTRAR}" = "" ] |
278 if [ "${REGISTRAR}" = "" ] |
276 then |
279 then |
310 12) tmonth=dec ;; |
313 12) tmonth=dec ;; |
311 *) tmonth=0 ;; |
314 *) tmonth=0 ;; |
312 esac |
315 esac |
313 tday=`echo ${tdomdate} | cut -d'/' -f3` |
316 tday=`echo ${tdomdate} | cut -d'/' -f3` |
314 DOMAINDATE=`echo $tday-$tmonth-$tyear` |
317 DOMAINDATE=`echo $tday-$tmonth-$tyear` |
|
318 elif [ "${TLDTYPE}" == "cz" ]; # for .cz 08.02.2013 dd.mm.yyyy |
|
319 then |
|
320 tdomdate=`cat ${WHOIS_TMP} | awk '/expire:/ { print $2 }'` |
|
321 tyear=`echo ${tdomdate} | cut -d'.' -f3` |
|
322 tmon=`echo ${tdomdate} | cut -d'.' -f2` |
|
323 tday=`echo ${tdomdate} | cut -d'.' -f1` |
|
324 case ${tmon} in |
|
325 1|01) tmonth=jan ;; |
|
326 2|02) tmonth=feb ;; |
|
327 3|03) tmonth=mar ;; |
|
328 4|04) tmonth=apr ;; |
|
329 5|05) tmonth=may ;; |
|
330 6|06) tmonth=jun ;; |
|
331 7|07) tmonth=jul ;; |
|
332 8|08) tmonth=aug ;; |
|
333 9|09) tmonth=sep ;; |
|
334 10) tmonth=oct ;; |
|
335 11) tmonth=nov ;; |
|
336 12) tmonth=dec ;; |
|
337 *) tmonth=0 ;; |
|
338 esac |
|
339 DOMAINDATE=`echo $tday-$tmonth-$tyear` |
315 else # .com, .edu, .net and may work with others |
340 else # .com, .edu, .net and may work with others |
316 DOMAINDATE=`cat ${WHOIS_TMP} | ${AWK} '/Expiration/ { print $NF }'` |
341 DOMAINDATE=`cat ${WHOIS_TMP} | ${AWK} '/Expiration/ { print $NF }'` |
317 fi |
342 fi |
318 |
343 |
319 #echo $DOMAINDATE # debug |
344 #echo $DOMAINDATE # debug |
455 elif [ -f "${SERVERFILE}" ] |
480 elif [ -f "${SERVERFILE}" ] |
456 then |
481 then |
457 print_heading |
482 print_heading |
458 while read DOMAIN |
483 while read DOMAIN |
459 do |
484 do |
|
485 sleep 30 |
460 check_domain_status "${DOMAIN}" |
486 check_domain_status "${DOMAIN}" |
461 |
487 |
462 done < ${SERVERFILE} |
488 done < ${SERVERFILE} |
463 |
489 |
464 ### There was an error, so print a detailed usage message and exit |
490 ### There was an error, so print a detailed usage message and exit |
474 rm -f ${WHOIS_TMP} |
500 rm -f ${WHOIS_TMP} |
475 |
501 |
476 ### Exit with a success indicator |
502 ### Exit with a success indicator |
477 exit 0 |
503 exit 0 |
478 |
504 |
|
505 # vim: et ts=4 sw=4 |