#!/bin/sh
# This script cleans up the files that can be left behind when managed logs email notification fails.
# If the managed logs files are not removed system resources are lost and subsequent managed logs notifications 
# will continue to fail. 100411 Ross  
echo "STATUS: removing managed logs files ..."
cd /mnt/ramdisk/emailOut
# remove the email event text file typically A12345 or B56789
rm -f *
cd ..
# Now removed any managed logs fifos, zipped log files, and the managed logs in progress file.  
rm -f *.logs
rm -f *.zip
rm -f /mnt/ramdisk/getManagedLogsInProgress
# We may need to kill some managed logs processes that got left hanging, but lately I have not seen any.   
echo "STATUS: Managed logs cleanup exit ..."

exit 0