diff options
author | 2017-02-18 01:54:45 +0100 | |
---|---|---|
committer | 2017-02-18 02:26:15 +0100 | |
commit | 21da16484ef5530b9a17372185ee94854a161979 (patch) | |
tree | 74d52a6c12f6946843ebc3157d9174c6ee7c7f6b | |
parent | Resolve default duplication (diff) | |
download | porticron-21da16484ef5530b9a17372185ee94854a161979.tar.gz porticron-21da16484ef5530b9a17372185ee94854a161979.tar.bz2 porticron-21da16484ef5530b9a17372185ee94854a161979.zip |
Make mail from configurable through ${FROM} (issue #7)
-rwxr-xr-x | bin/porticron | 5 | ||||
-rw-r--r-- | etc/porticron.conf | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/bin/porticron b/bin/porticron index 6153507..2a1da0c 100755 --- a/bin/porticron +++ b/bin/porticron @@ -121,6 +121,7 @@ PORTDIR=$(portageq get_repo_path $(portageq envvar EROOT) gentoo) # defaults, second half : ${RCPT:=root@${FQDN}} +: ${FROM:=root@${FQDN}} : ${SYNC_CMD:=/usr/bin/emerge --sync} : ${SYNC_OVERLAYS_CMD:=/bin/true} @@ -162,7 +163,7 @@ ${GLSA_UPGRADES} " cat <<EOF | send_mail To: ${RCPT} -From: root@${FQDN} +From: ${FROM} Subject: ${SUBJECT_WARN} Date: ${DATE} @@ -241,7 +242,7 @@ fi cat <<EOF | send_mail To: ${RCPT} -From: root@${FQDN} +From: ${FROM} Subject: ${SUBJECT} Date: ${DATE} diff --git a/etc/porticron.conf b/etc/porticron.conf index 8ddfa75..33b770a 100644 --- a/etc/porticron.conf +++ b/etc/porticron.conf @@ -19,6 +19,9 @@ SYNC_OVERLAYS_CMD="/bin/true" # emerge upgrade options UPGRADE_OPTS="--deep --update" +# sender of reports +FROM="root@$(hostname --fqdn)" + # recipient for reports RCPT=root@$(hostname -f) |