From owner-freebsd-questions@FreeBSD.ORG Fri Jan 14 22:01:13 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2FD4616A4CE for ; Fri, 14 Jan 2005 22:01:13 +0000 (GMT) Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id B30B443D46 for ; Fri, 14 Jan 2005 22:01:12 +0000 (GMT) (envelope-from jerrymc@clunix.cl.msu.edu) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.11.7p1+Sun/8.11.7) id j0EM16M06974; Fri, 14 Jan 2005 17:01:06 -0500 (EST) From: Jerry McAllister Message-Id: <200501142201.j0EM16M06974@clunix.cl.msu.edu> To: fquest@ccstores.com (Jim Pazarena) Date: Fri, 14 Jan 2005 17:01:05 -0500 (EST) In-Reply-To: <41E833FB.5070306@ccstores.com> from "Jim Pazarena" at Jan 14, 2005 01:04:59 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: FreeBSD Questions Subject: Re: boot up notification X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jan 2005 22:01:13 -0000 > > 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 >