Author |
Post |
|
#1 Thu Mar 03, 2011 02:34, 170 months ago.
|
Member
Registered: Apr 2010
Location: Malaysia
|
Operating system name and version: CentOS 4.8 Version of smsd: 3.1.11 Smsd installed from: sources Name and model of a modem / phone: Wavecom Interface: serial
Hi and thanks to Keke. I have been using smstools for almost a year. Overall a great and easy piece of software to use.
About the files in /var/spool/sms/incoming and /var/spool/sms/sent, can I safely delete them? Is there some kind of cron job that can do that on, say, a weekly basis ? Please advise. TIA.
|
|
#2 Thu Mar 03, 2011 10:46, 170 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
You can delete files, if you do not need them. Smsd itself does not need those files, but if you are running an eventhandler which refers to sent files, then files must be kept. In any case it is reasonable to keep the size of directories small, not containing thousands of files. Here is the script which moves files older than one week to the archive. Cron could run this script for example once per hour. #!/bin/bash
BASEDIR="/var/spool/sms" DIRS="sent report incoming"
for dir in $DIRS do ! [ -d $BASEDIR/archive/$dir ] && mkdir $BASEDIR/archive/$dir find $BASEDIR/$dir -type f -mtime +6 -exec mv {} $BASEDIR/archive/$dir \; done 'bash' Syntax Highlight powered by GeSHi
|
|
#3 Thu Mar 03, 2011 10:51, 170 months ago.
|
Member
Registered: Apr 2010
Location: Malaysia
Topic owner
|
Done that. Thank you Keke !
|
|
#4 Thu Mar 03, 2011 11:04, 170 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Thanks.
One question: Do you successfully use status reports with your Wavecom (Fastrak Supreme 10 ?) modem? If you do, can you insert the modem setting report_device_details = yes, restart smsd and show those details from the log?
|
|
#5 Fri Mar 04, 2011 02:05, 170 months ago.
|
Member
Registered: Apr 2010
Location: Malaysia
Topic owner
|
My bad  I must have accidentally copied the version number from somewhere, when actually I am only running v3.1.6 instead of v3.1.11. My apologies. All other info are correct though. I inserted report_device_details = yes into smsd.conf and restart gave an error. So I just comment that settings and restart smsd. This is a production server. Would it be okay to upgrade by just overwriting the old files with the newer version ?
|
|
#6 Fri Mar 04, 2011 11:31, 170 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
You do not need to upgrade smsd, but if you do, just compile the new version and cp -p smsd $(which smsd).
The information what I was seeking for, was answers from the modem to the following commands:
AT+CGMI
AT+CGMM
AT+CGMR
AT+CNMI=?
AT+CNMI?
But if you have not successfully used status reports, the information is not required.
|
|
#7 Mon Mar 14, 2011 03:08, 170 months ago.
|
Member
Registered: Apr 2010
Location: Malaysia
Topic owner
|
In the bash script, woud it be okay to include the failed directory like so:
|
|
#8 Mon Mar 14, 2011 09:15, 170 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
It's okay.
|