#!/bin/tcsh # Send emails to people who request it based on realtime alerts. cd $0:h if ($1 == inner) then killall -q fast_alert_search_email_sms limit coredumpsize unlimited set printexitvalue=1 while 1 date ./fast_alert_search_email_sms -f ../config_common.txt -f config_email_sms.txt hostname | mail -s 'restarting email/sms server' philip@trade-ideas.com,michael@trade-ideas.com # Sleep for 1 minute, rather than the normal 1 second. That's mostly because we don't want to get spammed with a lot of emails of things get really bad. We can probably get away with that for the email program. I wouldn't recommend that for most servers. sleep 60 end else ./$0:t inner < /dev/null >>& output_email_sms.txt & endif