Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mail encoding and typos #161

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ALL_README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# All available README files by language

- [Read the README in English](README.md)
- [Lee el README en español](README_es.md)
- [Lea el README en español](README_es.md)
- [Irakurri README euskaraz](README_eu.md)
- [Lire le README en français](README_fr.md)
- [Le o README en galego](README_gl.md)
Expand Down
6 changes: 3 additions & 3 deletions conf/backup-with-borg
Original file line number Diff line number Diff line change
Expand Up @@ -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")"
Expand All @@ -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