in reply to Email printed message
-Silent11#!/usr/local/bin/perl -w use strict; my @uptime = split //, `uptime`; my ($to,$from,$subject) = ('mail@list.com','sys@admin.com','ALERT : re +boot'); if ($uptime[2] > 1 ){ open(MAIL, "|/usr/sbin/sendmail -t"); print <<MAIL; To: $to From: $from Subject: $subject Server rebooted in the last 24 hours. MAIL close(MAIL); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Email printed message
by talexb (Chancellor) on Mar 09, 2002 at 04:10 UTC |