blob: 86c1ebabb45b87e14ffe1895eedbe8780efeec7d (
plain)
- #!/bin/sh
- # if an error occurs, break immediately
- set -e
- # Variables from Kannel sms gateway
- sms_from="$SMS_PHONE"
- sms_to="$1"
- app="$2"
- shift 2
- msg="$*"
- # Settings for the "mail" outgoing email command
- export smtp=mail.bitbase.dk
- export from=hp@fossasia.org
- export sender="$from"
- # Check keyword and break after processing if it matches
- case "$app" in
- phone)
- cat <<EOF | mail -s "[sms] phone $sms_from" hp@fossasia.org mb@fossasia.org
- Someone at $sms_from sent an sms to $sms_to with keyword phone
- and this message (supposedly his/her name):
- $msg
- EOF
- exit 1
- ;;
- esac
|