Build precise queries to find exactly what you need
Press ESC to close
for the errors :
ERROR: [: 89: XXX: unexpected operator
you have to change all tests “==” by a simple “=”
tested on ubuntu 12.04
here is my correction to add .fr domains (thanks to marc.lecrosnier for his original version) My whois return “Expiry Date” not “anniversary”
Line 86 : elif [ ${DLTYPE} == ‘fr’ ]; then TYPE=afnic WHOIS_SERVER=”whois.nic.fr”
Line : 131 # for .fr domains elif [ $TYPE = ‘afnic’ ]; then day=`cat ${FILE} | awk ‘/Expiry Date:/’ | cut -d ‘:’ -f2 | cut -d ‘ ‘ -f2 | cut -d ‘/’ -f1` month=`cat ${FILE} | awk ‘/Expiry Date:/’ | 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
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!