#!/bin/sh PATH=$PATH:/usr/local/bin # # Easy invocation of python script # Add the following to crontab: # @daily //wrapper-sensors-battery.sh # result=$(/home/mischa/hue/get-sensors.py bridge1 -b 20) result2=$(/home/mischa/hue/get-sensors.py bridge2 -b 20) if [[ -n "$result" ]]; then echo "${result}" | mail -s "Hue Battery Status bridge1" $(cat /home/mischa/hue-email) fi if [[ -n "$result2" ]]; then echo "${result2}" | mail -s "Hue Battery Status bridge2" $(cat /home/mischa/hue-email) fi