Random Project

My small contribution

Excellent work

here is my contribution to add .fr domains :

Line 86 :
elif [ ${DLTYPE} == ‘fr’ ];
then
TYPE=afnic
WHOIS_SERVER=”whois.nic.fr”

Line : 131
# for .fr domains
elif [ $TYPE == ‘afnic’ ];
then
#expiration=`cat ${FILE} | awk ‘/anniversary:/’ | cut -d ‘:’ -f2 | cut -d ” -f2`
day=`cat ${FILE} | awk ‘/anniversary:/’ | cut -d ‘:’ -f2 | cut -d ‘ ‘ -f2 | cut -d ‘/’ -f1`
month=`cat ${FILE} | awk ‘/anniversary:/’ | cut -d ‘:’ -f2 | cut -d ‘ ‘ -f2 | cut -d ‘/’ -f2`
year=$(date +%Y)
getmonth()
{
case $month in
01) echo jan ;;
02) echo feb ;;
03) echo mar ;;
04) echo apr ;;
05) echo may ;;
06) echo jun ;;
07) echo jul ;;
08) echo aug ;;
09) echo sep ;;
10) echo oct ;;
11) echo nov ;;
12) echo dec ;;
*) echo 0 ;;
esac
}

if [ $(($(date -d “$day-$(getmonth $month)-$year” +%s)-$(date +%s))) -lt 0 ];
then
year=$(($(date +%Y)+1))
fi

expiration=$day-$(getmonth $month)-$year

Marc