#!/bin/bash


#########################################################################################################
#													#
#	Author		:	Gourav Joshi								#
#	Date		:	16 June 2011								#
#	Email		:	gouravjoshi@gmail.com							#	
#	Objective	:	Generate the output file to be read by NRPE plugin			#
#	Usage		:	This script will run as a daemon to generate output file for NRPE	#
#				Plugin. Just need to provide appropriate variables and you are ready    #
#				to go. -w <Warning Limit>(in KB), -c <Critical Limit>(in KB), 		#
#				-p <Postfix Instance>							# 
#				You can change output file location and name, but remember to changes   #
#				accordingly in other scripts and configurtion files.			#
#													#
#########################################################################################################		


while [ 0 ]
do

> /tmp/que

/bin/bash /usr/local/nagios/libexec/check_postque.sh -w 500000 -c 700000 -p postfix > /tmp/que

ext=`echo $?`

echo "exitstatus=$ext" >> /tmp/que

sleep 60
done
