don't send empty emails
This commit is contained in:
parent
440a9b96ee
commit
8742d1e32a
@ -5,4 +5,8 @@ PATH=$PATH:/usr/local/bin
|
||||
# Add the following to crontab:
|
||||
# @daily /<path-to-your-script>/wrapper-sensors-battery.sh
|
||||
#
|
||||
(/home/mischa/hue/get-sensors.py $(cat /home/mischa/hue-bridge) $(cat /home/mischa/hue-token) -b 60) | mail -s "Hue Battery Status" $(cat /home/mischa/hue-email)
|
||||
result=$(/home/mischa/hue/get-sensors.py $(cat /home/mischa/hue-bridge) $(cat /home/mischa/hue-token) -b 20)
|
||||
|
||||
if [ -n "$result" ]; then
|
||||
echo "${result}" | mail -s "Hue Battery Status" $(cat /home/mischa/hue-email)
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user