Advertisement
Infra_HDC

sendsms.sh for ZABBIX

Dec 21st, 2018
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.37 KB | None | 0 0
  1. rdanilov@itmon-1812:~/rd-scripts$ cat ./sendsms.sh
  2. #!/bin/bash
  3. # see https://github.com/z-afshar/zabbix-gammu-smsd/blob/master/sendsms.sh
  4. HOME=/etc
  5. PATH=/bin:/sbin:/usr/bin:/usr/sbin
  6. #MOBILE_NUMBER=`echo "$1" | sed s#\s##`
  7. MOBILE_NUMBER=$1
  8. MSG_LENGTH=`echo $2 | wc -m`
  9. # Send it
  10. echo "$2"  | /usr/bin/gammu-smsd-inject TEXT "${MOBILE_NUMBER}" -autolen ${MSG_LENGTH}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement