HylaFAX The world's most advanced open source fax server

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

Re: [hylafax-users] FTP to FAX



Steven Totaro wrote:


I would like to know if anyone has a script that watches a directory (on the HylaFax Server) for PDF files then calls sendfax to send the fax?



I've done this kind of thing numerous times. Each implementation has been proprietary, but really, it's a snap to do. I generally have cron just run the script every minute which scans the directory for fax files and faxes them if there are. I would generally recommend being cautious about "locking" (i.e. with lockfiles) files and moving them out of the way when they're in-progress so that if it runs long the next cron job won't try faxing the same file. And if you're in control of the ftp-ing, generating that lockfile before uploading is a smart thing, too. The lockfile generally stores the PID, so the script should know if it owns the lockfile or not.


The sending information is generally part of the specially-formatted filename, but you can also store that inside the PDF with PDF tags of sorts.

Lee.

____________________ HylaFAX(tm) Users Mailing List _______________________
 To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
 *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*




Project hosted by iFAX Solutions