gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

smsd action to save incoming sms to file


From: Nick
Subject: smsd action to save incoming sms to file
Date: Mon, 04 Sep 2006 20:38:07 +0300

Hi all
I wrote this action for smsd file module , maybe is usefull fol someone

Smsd must start with action in command line -u /home/sms/action
/usr/local/sbin/smsd -m file -c /home/sms/spool -u /home/sms/action --logfile /home/sms/smslog &

Action saves all incoming sms to incoming file
and a copy in sms file, and emails the new sms to a email address with phone number as subject

#!/bin/bash

echo "Phone number: $1"  >>/home/sms/incoming
echo "Phone number: $1"  >/home/sms/sms

echo "Date: $2" >> /home/sms/incoming
echo "Date: $2" >> /home/sms/sms

cat |tee -a /home/sms/sms /home/sms/incoming


echo ""
cat /home/sms/sms |mail -s $1 address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]