Date: Thu, 8 Jul 2010 03:57:49 -0700 From: George Davidovich <freebsd@optimis.net> To: freebsd-questions@freebsd.org Subject: Re: [6.3] Get e-mail when CTRL-ALT-DEL is used? Message-ID: <20100708105749.GA34771@marvin.optimis.net> In-Reply-To: <rs8b36521ebsv6n8rfq9797gjbn1pdg2lm@4ax.com> References: <rs8b36521ebsv6n8rfq9797gjbn1pdg2lm@4ax.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 08, 2010 at 12:12:27PM +0200, Gilles wrote: > This is on a remote 6.3 host: I'd like to get an e-mail if a user hits > the CTRL-ALT-DEL to reboot the server. > > Googling told me that the use of the three-key combo can be > enabled/disabled when compiling a new kernel, but not how to manage > this feature when it's enabled in a running kernel. > > Is there a configuration file somewhere that would let me add e-mail > support for this action? Assuming you want to know whether the server was rebooted (as opposed to whether a user invoked a given key combination), adding something along the lines of the following to root's crontab(5) should suffice: @reboot echo "`hostname` rebooted" \ | mail -s "`hostname` rebooted" gilles@example.org -- George
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100708105749.GA34771>