Skip to content

Commit

Permalink
[Change] set email alerts to disabled when -z $mail / issue verbose w…
Browse files Browse the repository at this point in the history
…arning on CLI; issue #220
  • Loading branch information
rfxn committed May 26, 2017
1 parent 89c7057 commit 322b329
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion files/internals/functions
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ prerun() {
exit 1
fi

if [ ! -f "$mail" ]; then
if [ ! -f "$mail" ] || [ -z "$mail" ]; then
email_alert=0
fi

Expand Down Expand Up @@ -1073,6 +1073,9 @@ scan() {
eout "{scan.hook} scan of $spath in progress (id: $datestamp.$$)"
fi
cnt=0
if [ -z "$mail" ]; then
eout "{scan} no \$mail binary found, e-mail alerts disabled."
fi
if [ -f "$clamscan" ] && [ "$scan_clamscan" == "1" ]; then
if [ -z "$hscan" ]; then
eout "{scan} found clamav binary at $clamscan, using clamav scanner engine..." 1
Expand Down

0 comments on commit 322b329

Please sign in to comment.