21 Sep
2006
21 Sep
'06
8:05 p.m.
Hey all, Attached is a paging script I'm using to limit the amount of pages within a 15 minute window to one page per window.
Script comes with no warranty or support, use at your own will. I know, it's kludgey as well.
--Pat
#!/usr/bin/perl
$INTERAL = 900; ## # Of Seconds between Pages
$RCPT = $ENV{'RCPT'};
$RCPTN = "/bb/hms/server/tmp/np-".$RCPT;
$ACKCODE = $ENV{'ACKCODE'};
$BBHOSTSVC = $ENV{'BBHOSTSVC'};
$NOW = date +%s;
chomp $NOW;
$mstat = (stat $RCPTN)[9]; $fileage = $NOW-$mstat;
if ( $fileage >= $INTERVAL ) { open (PAGER,">$RCPTN"); system('echo $BBHOSTSVC [$ACKCODE] | mail $RCPT'); print PAGER " "; close (PAGER); };
7217
Age (days ago)
7217
Last active (days ago)
0 comments
1 participants
participants (1)
-
PNIXON@ci.somerville.ma.us