Browse Source

Merge pull request #475 from marvinl97/master

Added missing bracket and linebreak
pull/489/head
Scarsz 10 years ago
parent
commit
54596d020b
  1. 5
      functions/fn_email

5
functions/fn_email

@ -8,6 +8,7 @@
local modulename="Email" local modulename="Email"
fn_printdots "Sending notification to ${email}" fn_printdots "Sending notification to ${email}"
echo -en "\n"
fn_details_distro fn_details_distro
{ {
echo -e "========================================\n${servicename} details\n========================================\n" echo -e "========================================\n${servicename} details\n========================================\n"
@ -27,7 +28,7 @@ fn_details_distro
echo -e "========================================\nLogs\n========================================\n" echo -e "========================================\nLogs\n========================================\n"
echo -e "Script log\n===================\n" echo -e "Script log\n===================\n"
fn_details fn_details
|sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"|tee "${scriptlogdir}/${servicename}-email.log" }|sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"|tee "${scriptlogdir}/${servicename}-email.log"
tail -25 "${scriptlog}" >> "${emaillog}" tail -25 "${scriptlog}" >> "${emaillog}"
if [ ! -z "${consolelog}" ]; then if [ ! -z "${consolelog}" ]; then
echo -e "\n\nConsole log\n====================\n" >> "${emaillog}" echo -e "\n\nConsole log\n====================\n" >> "${emaillog}"
@ -41,4 +42,4 @@ mail -s "${subject}" ${email} < "${emaillog}"
fn_printok "Sending notification to ${email}" fn_printok "Sending notification to ${email}"
fn_scriptlog "Sent notification to ${email}" fn_scriptlog "Sent notification to ${email}"
sleep 1 sleep 1
echo -en "\n" echo -en "\n"

Loading…
Cancel
Save