#!/bin/sh # # Simple shell script to send a notification through boxcar using curl # written by Fabian Meyer (fm_scripts at noinfo.de) # ############################################################################ CURL=`which curl` # fill in the boxcar fields for your own provider TOKEN="" SECRET="" PROVIDER="" # this is the part of your demo-url after # http://boxcar.io/devices/providers/ ############################################################################ if [ "$1" = "" ]; then echo "\tsend a notification through the boxcar provider api service" echo echo "\tUsage: $0 [optional headline] message" echo exit 1 fi if [ "$2" = "" ]; then NAME=$0 MESSAGE=$1 else NAME=$1 MESSAGE=$2 fi $CURL -d "token=$TOKEN&secret=$SECRET¬ification[from_screen_name]=$NAME" \ -d "¬ification[message]=$MESSAGE" \ http://boxcar.io/devices/providers/$PROVIDER/notifications exit 0