This is so we can pipe notes to the script, right? It causes issues when run from other scripts though.
Used pushbullet-bash in Deluge for notifications and as an upstart job in both cases it seemed to think a terminal was connected and hung at 'cat'. Not the best solution I guess.
if [ ! -t 0 ]; then
# we have something on stdin
body=$(cat)