|
|
@@ -8,6 +8,7 @@
|
|
|
|
|
|
local modulename="Email"
|
|
|
fn_printdots "Sending notification to ${email}"
|
|
|
+echo -en "\n"
|
|
|
fn_details_distro
|
|
|
{
|
|
|
echo -e "========================================\n${servicename} details\n========================================\n"
|
|
|
@@ -27,7 +28,7 @@ fn_details_distro
|
|
|
echo -e "========================================\nLogs\n========================================\n"
|
|
|
echo -e "Script log\n===================\n"
|
|
|
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}"
|
|
|
if [ ! -z "${consolelog}" ]; then
|
|
|
echo -e "\n\nConsole log\n====================\n" >> "${emaillog}"
|
|
|
@@ -41,4 +42,4 @@ mail -s "${subject}" ${email} < "${emaillog}"
|
|
|
fn_printok "Sending notification to ${email}"
|
|
|
fn_scriptlog "Sent notification to ${email}"
|
|
|
sleep 1
|
|
|
-echo -en "\n"
|
|
|
+echo -en "\n"
|