diff --git a/usr/local/bin/borgwrapper b/usr/local/bin/borgwrapper index 8ccf505..00340d1 100755 --- a/usr/local/bin/borgwrapper +++ b/usr/local/bin/borgwrapper @@ -188,7 +188,8 @@ backup() { ${BORG_BINARY} ${BORGWRAPPER_BORG_INFO_PARAMS} ${BORGWRAPPER_BACKUP_REPOSITORY}${BORGWRAPPER_BACKUP_NAME}::${BORGWRAPPER_BACKUP_TIMESTAMP_FORMAT} >> ${BORGWRAPPER_BACKUP_LOG_FILE}; if [ "${BORGWRAPPER_BACKUP_NOTIFY_VIA_MAIL}" = true ]; then - cat ${BORGWRAPPER_BACKUP_LOG_FILE}|mailx -Ssendwait -s "[borgwrapper ${BORGWRAPPER_BACKUP_NAME}]" ${BORGWRAPPER_BACKUP_NOTIFY_MAIL_ADDRESS}; + local hostname=$(hostname) + cat ${BORGWRAPPER_BACKUP_LOG_FILE}|mailx -Ssendwait -s "[borgwrapper on ${hostname} for ${BORGWRAPPER_BACKUP_NAME}]" ${BORGWRAPPER_BACKUP_NOTIFY_MAIL_ADDRESS}; fi fi diff --git a/usr/local/bin/resticwrapper b/usr/local/bin/resticwrapper index 36b4ad7..dd2f972 100755 --- a/usr/local/bin/resticwrapper +++ b/usr/local/bin/resticwrapper @@ -192,7 +192,8 @@ backup() { ${RESTIC_BINARY} ${RESTICWRAPPER_RESTIC_INFO_PARAMS} >> ${RESTICWRAPPER_BACKUP_LOG_FILE}; if [ "${RESTICWRAPPER_BACKUP_NOTIFY_VIA_MAIL}" = true ]; then - cat ${RESTICWRAPPER_BACKUP_LOG_FILE}|mailx -Ssendwait -s "[resticwrapper ${RESTICWRAPPER_BACKUP_NAME}]" ${RESTICWRAPPER_BACKUP_NOTIFY_MAIL_ADDRESS}; + local hostname=$(hostname) + cat ${RESTICWRAPPER_BACKUP_LOG_FILE}|mailx -Ssendwait -s "[resticwrapper on ${hostname} for ${RESTICWRAPPER_BACKUP_NAME}]" ${RESTICWRAPPER_BACKUP_NOTIFY_MAIL_ADDRESS}; fi fi