Date: Fri, 14 Jan 2005 17:01:05 -0500 (EST) From: Jerry McAllister <jerrymc@clunix.cl.msu.edu> To: fquest@ccstores.com (Jim Pazarena) Cc: FreeBSD Questions <questions@freebsd.org> Subject: Re: boot up notification Message-ID: <200501142201.j0EM16M06974@clunix.cl.msu.edu> In-Reply-To: <41E833FB.5070306@ccstores.com> from "Jim Pazarena" at Jan 14, 2005 01:04:59 PM
next in thread | previous in thread | raw e-mail | index | archive | help
> > I would like one of my servers to send me an email when > it boots. I envision a script in rc.conf to do this. > > Is there an easier way, or an automatic system which can do this? Put a little script in /usr/local/etc/rc.d name it something like /usr/local/etc/rc.d/bootmail.sh In it, put something like: #!/bin/sh echo "Coming Up at: `date`" | /usr/bin/mail -s 'Boot Notice' your@email.addr exit 0 Make sure it has execute permission and it will run at boot time. It will send you an Email message complete with the date when it boots. Note the _back_ single quotes around date. ////jerry > > Jim >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501142201.j0EM16M06974>