nightly/conf/nightly.sendmail: Use mail if mutt is not available

This commit is contained in:
Bart Van Assche
2017-02-28 22:10:49 -08:00
parent 84a80e83fe
commit b13fd42124
+9 -5
View File
@@ -19,10 +19,14 @@ do
esac
done
if [ $# -ge 3 ]; then
gzip -9 <"$3" >"$3.gz"
mutt -s "$1" -a "$3.gz" ${recipients} < "$2"
rm -f "$3.gz"
if type mutt >/dev/null 2>&1; then
if [ $# -ge 3 ]; then
gzip -9 <"$3" >"$3.gz"
mutt -s "$1" -a "$3.gz" ${recipients} < "$2"
rm -f "$3.gz"
else
mutt -s "$1" ${recipients} < "$2"
fi
else
mutt -s "$1" ${recipients} < "$2"
mail -s "$1" ${recipients} < "$2"
fi