{"id":1985,"date":"2013-04-26T15:01:15","date_gmt":"2013-04-26T07:01:15","guid":{"rendered":"http:\/\/rmohan.com\/?p=1985"},"modified":"2013-04-26T15:31:35","modified_gmt":"2013-04-26T07:31:35","slug":"email-linux","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=1985","title":{"rendered":"Email Linux"},"content":{"rendered":"<p>@reboot \/bin\/mail -s &#8220;$HOSTNAME &#8211; rebooted&#8221; \u00a0msn@rmoahn.com &lt;&lt;&lt; &#8220;$HOSTNAME has rebooted on $(date)&#8221;\u00a0<\/p>\n<p>&nbsp;<\/p>\n<p>The ability to know when a system reboot. The tips below will send out an email when a Linux system is reboot. This should indicate to the Administrator that something went wrong with the shutdown. The tips below are for a Linux based system. There are two method as following :-<\/p>\n<p>Method-1<\/p>\n<p><strong># crontab -e<\/strong><\/p>\n<p><em>@reboot\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0echo \u201cALERT \u2013 Server `hostname` has Restarted on `date`\u201d | mutt -s \u201cALERT ::: System Rebooted `hostname`\u201d info@msn.com<\/em><\/p>\n<p>Method-2<\/p>\n<p><strong># vim \/etc\/rc.local<\/strong><\/p>\n<p><em>echo \u201cALERT \u2013 Server `hostname` has Restarted on `date`\u201d | mutt -s \u201cALERT ::: System Rebooted `hostname`\u201d info@<em>msn.com<\/em><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>@reboot \/bin\/mail -s &#8220;$HOSTNAME &#8211; rebooted&#8221; msn@rmoahn.com &lt;&lt;&lt; &#8220;$HOSTNAME has rebooted on $(date)&#8221; <\/p>\n<p>&nbsp;<\/p>\n<p>The ability to know when a system reboot. The tips below will send out an email when a Linux system is reboot. This should indicate to the Administrator that something went wrong with the shutdown. The tips below are for [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/1985"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1985"}],"version-history":[{"count":3,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/1985\/revisions"}],"predecessor-version":[{"id":1987,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/1985\/revisions\/1987"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1985"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1985"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1985"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}