Linux.com

bizna

bizna

  • Linux.com Member
  • Posts: 1
  • Member Since: 01 Jul 09
  • Last Logged In: 07 Jul 09

Latest Posts

Posted by
Topic
Post Preview
Posted
  • bizna
    RE: How do I send email on shutdown or reboot
    You can simply put a small script that takes the time, and send you an Email with either 'boot' or 'shutdown'. Put it in the relevant rc's, and that's it. For example, a simple 'boot' script can be: [code]#!/bin/bash mail -s "boot at `date`" you@yourdomain.com [/code] Plain, simple. Leave the hassle for other folks. Good luck! Dotan
    Link to this post 01 Jul 09

    You can simply put a small script that takes the time, and send you an Email with either 'boot' or 'shutdown'.

    Put it in the relevant rc's, and that's it.

    For example, a simple 'boot' script can be:

    #!/bin/bash
    mail -s "boot at `date`" you@yourdomain.com

    Plain, simple. Leave the hassle for other folks.

    Good luck!
    Dotan

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board