cc2ae25355b605c983e2431ef7b346de811d218c

Author
zertrin <zrk951@gmail.com>
Committer
GitHub <noreply@github.com>
Date

Message

Merge pull request #154 from dgibbs64/dev

[hostname] contains invalid character '[' in CentOS 7

Diff

 1diff --git a/duplicity-backup.sh b/duplicity-backup.sh
 2index a752decc27b8a9a2ae7209b27de6cd1171e61098..9f92a92e6e547adbf709fe8755c3c3bdc39812a8 100755
 3--- a/duplicity-backup.sh
 4+++ b/duplicity-backup.sh
 5@@ -488,7 +488,7 @@ email_logfile()
 6       if [ ! -x "${MAILCMD}" ]; then
 7           echo -e "Email couldn't be sent. ${MAIL} not available." >&2
 8       else
 9-          EMAIL_SUBJECT=${EMAIL_SUBJECT:="duplicity-backup ${BACKUP_STATUS:-"ERROR"} [${HOSTNAME}] ${LOG_FILE}"}
10+          EMAIL_SUBJECT=${EMAIL_SUBJECT:="duplicity-backup ${BACKUP_STATUS:-"ERROR"} (${HOSTNAME}) ${LOG_FILE}"}
11           case ${MAIL} in
12             ssmtp)
13               mailcmd_ssmtp;;