#!/bin/bash

# Only remove tmp files, when the tmpfs is mounted.
test=`/sbin/service astium-tmpfs status|grep running`
if [ -n "$test" ]
then
	for dir in /home/services/asterisk/var/spool/asterisk/monitor /tmp/mixmonitor
	do
		if [ -d $dir ]
		then
			# Removed tmp files after (24 * 7) hours.
			/usr/sbin/tmpwatch -f 168 $dir
		fi
	done
fi
