mirror of
https://github.com/YunoHost-Apps/borg_ynh.git
synced 2024-09-03 18:16:05 +02:00
Update backup-with-borg
Fix mail encoding and typos
This commit is contained in:
parent
159bd111c6
commit
dbee3a5033
1 changed files with 3 additions and 3 deletions
|
@ -60,7 +60,7 @@ for application in $(sudo ls /etc/yunohost/apps/); do
|
|||
done
|
||||
|
||||
#=========================================================
|
||||
# SEND MAIL TO NOTIFY SUCCED OR FAILED OPERATIONS
|
||||
# SEND MAIL TO NOTIFY ABOUT SUCCEEDED OR FAILED OPERATIONS
|
||||
#=========================================================
|
||||
|
||||
partial_errors="$(cat "$log_file" | grep -E "Error|Skipped")"
|
||||
|
@ -79,9 +79,9 @@ else
|
|||
fi
|
||||
|
||||
if [[ -n "$errors" && $mailalert != "never" ]]; then
|
||||
cat <(echo -e "$errors\n\n\n") "$log_file" "$err_file" | mail -s "[borg] Backup failed from $domain onto $repository" root
|
||||
cat <(echo -e "$errors\n\n\n") "$log_file" "$err_file" | mail -a "Content-Type: text/plain; charset=UTF-8" -s "[borg] Backup failed from $domain onto $repository" root
|
||||
exit 1
|
||||
elif [ "$mailalert" == "always" ]; then
|
||||
cat "$log_file" | mail -s "[borg] Backup succeed from $domain onto $repository" root
|
||||
cat "$log_file" | mail -a "Content-Type: text/plain; charset=UTF-8" -s "[borg] Backup succeeded from $domain onto $repository" root
|
||||
exit 0
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue