-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathaspsms.sh
More file actions
34 lines (27 loc) · 1.27 KB
/
aspsms.sh
File metadata and controls
34 lines (27 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
#########################################################################################
# DESC: Send SMS via ASPSMS gateway from OpenWrt, used by checkhost.sh
#########################################################################################
# Copyright (c) Chris Ruettimann <chris@bitbull.ch>
# This software is licensed to you under the GNU General Public License.
# There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
# along with this software; if not, see
# http://www.gnu.org/licenses/gpl.txt
# HOWTO SETUP ###########################################################################
# - download this script and make it executeable
# - fill in the userKey, Password and FROM var below
# - usage:
# aspsms.sh <mobile-number> <text to send, spaced get replaced by _>
PATH=/usr/bin:/usr/sbin:/bin:/sbin:/etc/config/bin
export PATH
UserKey='AAAAABBBBCCC'
Password='12345654'
FROM=SenderName
MOBILE="$1"
SMS="$2"
SMS="`echo $SMS | tr ' ' '_'`"
echo SMS: $SMS
echo MOBILE: $MOBILE
curl -k "https://soap.aspsms.com/aspsmsx.asmx/SimpleTextSMS?UserKey=$UserKey&Password=$Password&Recipient=$MOBILE&Originator=$FROM&MessageText=$SMS"