summaryrefslogtreecommitdiff
path: root/sms.d
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2010-11-23 08:37:53 +0100
committerJonas Smedegaard <dr@jones.dk>2010-11-23 08:37:53 +0100
commit3d21884475fd102e21d679cebbb119e33fb01479 (patch)
tree7ba820e0cdaee01ef5beaeea403171566485952f /sms.d
parenta64226d33b9904fe95c76adb56174234501e86aa (diff)
Fix swap from and system phone numbers.
Diffstat (limited to 'sms.d')
-rwxr-xr-xsms.d/phone8
1 files changed, 4 insertions, 4 deletions
diff --git a/sms.d/phone b/sms.d/phone
index 86c1eba..69e8ad5 100755
--- a/sms.d/phone
+++ b/sms.d/phone
@@ -4,8 +4,8 @@
set -e
# Variables from Kannel sms gateway
-sms_from="$SMS_PHONE"
-sms_to="$1"
+sms_phone="$SMS_PHONE"
+sms_fromphone="$1"
app="$2"
shift 2
msg="$*"
@@ -18,8 +18,8 @@ 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
+ cat <<EOF | mail -s "[sms] phone $sms_fromphone" hp@fossasia.org mb@fossasia.org
+Someone at $sms_fromphone sent an sms to $sms_phone with keyword phone
and this message (supposedly his/her name):
$msg
EOF