Skip to content

Commit

Permalink
made dumuzid able to print onscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
cyclingzealot committed Oct 18, 2016
1 parent d2df3a0 commit 8035b10
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions main.bash
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,17 @@ if [ "$sendAlert" -eq "1" ] ; then
echo >> $scratchFile
echo "Running on `hostname` by user `whoami`" >> $scratchFile
cat $scratchFile
if ~/bin/flagger.bash dumuzid 3600; then
cat $scratchFile | mail -s "$subject" $recipient
if [[ "recipient" != 'onscreen' ]]; then
if ~/bin/flagger.bash dumuzid 3600; then
cat $scratchFile | mail -s "$subject" $recipient
else
echo "Too early to send another notice"
fi
elif [[ "$recipient" == 'onscreen' ]]; then
notify-send `cat $scratchFile`
else
echo "Too early to send another notice"
echo "Unrecognized recipient"
exit 1
fi
else
~/bin/flagger.bash dumuzid -1
Expand Down

0 comments on commit 8035b10

Please sign in to comment.