-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated contrib script systemd/send-error.sh (#49)
Applied latest changes from ERROR env and added the profile to the mail
- Loading branch information
Showing
2 changed files
with
130 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,32 @@ | ||
#!/usr/bin/env bash | ||
[[ -z "${PROFILE_NAME}" ]] || sendmail -t <<ERRMAIL | ||
To: $1 | ||
From: "Resticprofile $(hostname -f)" <$USER@$(hostname -f)> | ||
Subject: Restic Failed: ${PROFILE_COMMAND} "${PROFILE_NAME}" | ||
From: "resticprofile $(hostname -f)" <$USER@$(hostname -f)> | ||
Subject: restic failed: ${PROFILE_COMMAND} "${PROFILE_NAME}" | ||
Content-Transfer-Encoding: 8bit | ||
Content-Type: text/plain; charset=UTF-8 | ||
${ERROR} | ||
---- | ||
COMMANDLINE: | ||
${ERROR_COMMANDLINE} | ||
---- | ||
STDERR: | ||
${ERROR_STDERR} | ||
---- | ||
DETAILS: | ||
$(systemctl status --full "resticprofile-${PROFILE_COMMAND}@profile-${PROFILE_NAME}") | ||
---- | ||
CONFIG: | ||
$(resticprofile --name "${PROFILE_NAME}" show) | ||
ERRMAIL | ||
exit 0 |