1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| #!/bin/sh
# Motion sample script to send an sms at start of an event.
# Replaces the former 'sms' option.
# Just define this script as 'on_event_start'-script in motion.conf like that:
# on_event_start send_sms "%Y-%m-%d %T"
#
# If you want to send an e-mail message here as well, just uncomment the last
# line of this script.
#change to suit your needs:
#location of 'sms-client' binary
SMS_CLIENT="/usr/bin/sms_client"
#Destination sms number
TO="12345"
#Don't change anything below this line
$SMS_CLIENT $TO "Motion detected $1"
#/usr/local/bin/send_mail $1 |
Partager