Fixed mime type of email containing pidstat
This commit is contained in:
parent
a99e3c3ab9
commit
68f72e2d8c
@ -109,6 +109,7 @@ send_notice () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
send () {
|
send () {
|
||||||
|
#set -x
|
||||||
if [[ "${#@}" -lt 2 ]] && [[ "${#@}" -gt 3 ]]; then
|
if [[ "${#@}" -lt 2 ]] && [[ "${#@}" -gt 3 ]]; then
|
||||||
echo "Wrong number of arguments to send()!" >&2
|
echo "Wrong number of arguments to send()!" >&2
|
||||||
return false
|
return false
|
||||||
@ -144,7 +145,7 @@ send () {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# is this an email or SMS?
|
# is this an email or SMS?
|
||||||
if [[ ! "${dst}" =~ "${sms_domain}" ]]; then
|
if [[ ! "${dst}" =~ "@${sms_domain}" ]]; then
|
||||||
for p in $(tr '|' ' ' <<< "${current_alarms}"); do
|
for p in $(tr '|' ' ' <<< "${current_alarms}"); do
|
||||||
printf "\npidstat info for ${p}\n\n" >> ${email}
|
printf "\npidstat info for ${p}\n\n" >> ${email}
|
||||||
print_pidstat "${p}" >> ${email}
|
print_pidstat "${p}" >> ${email}
|
||||||
@ -153,10 +154,11 @@ send () {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# send the message
|
# send the message
|
||||||
/usr/bin/mail --resource-files=/ \
|
/usr/bin/mail -m ${email} --resource-files=/ \
|
||||||
--subject="${subj}" \
|
--subject="${subj}" \
|
||||||
--end-options \
|
--end-options \
|
||||||
${dst} < ${email}
|
${dst}
|
||||||
|
#set +x
|
||||||
}
|
}
|
||||||
|
|
||||||
is_clear () {
|
is_clear () {
|
||||||
|
Loading…
Reference in New Issue
Block a user