Hacker News new | past | comments | ask | show | jobs | submit login

This is pretty cool, I drop the following shell script on all my servers:

    #!/bin/bash
    
    if [[ -z $1 && -z $2 ]]; then
        echo "No Message passed"
    else
        if [[ -z $2 ]]; then
            curl -s --form-string "token=MYAPPTOKEN" --form-string "user=MYUSERTOKEN" --form-string "message=$1" https://api.pushover.net/1/messages.json
        else
            curl -s --form-string "token=MYAPPTOKEN" --form-string "user=MYUSERTOKEN" --form-string "title=$1" --form-string "message=$2"  https://api.pushover.net/1/messages.json
        fi
    fi
It's SUPER basic and probably shitty but for me it's perfect. I can add " && push 'Command is Done'" to the end of any command and get a notification on my watch/phone/(and desktop? But I don't have pushover on my desktop installed). Great for things you threw into a screen/tmux session and want to know when they finished.



Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: