diff --git a/machine_poweroff.sh b/machine_poweroff.sh index 9371081..50c9dde 100755 --- a/machine_poweroff.sh +++ b/machine_poweroff.sh @@ -353,10 +353,14 @@ if $terminal ; then echo "" else - echo "" - echo -e " Going to power off the system '$(hostname -f)' .." - echo "" - sleep 5 + from_address="power-off@$(hostname -f)" + to_address="root" + content_type='Content-Type: text/plain;\n charset="utf-8"' + subject="Power OFF System $(hostname -f).." + msg=" Going to power off system '$(hostname -f)' .." + + echo -e "To:${_to_address}\n${content_type}\nSubject:$subject\n\n${msg}\n" \ + | /usr/sbin/sendmail -F "Webservice Monitor" -f $from_address $_to_address fi