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] Custom FaxDispatch



On Friday, October 11, 2002, at 05:53  PM, Bernard Jech wrote:

> Try this:
>
> case "DEVICE" in
>           ttyS4)
>                   FILETYPE=PDF;
>                   SENDTO=me@address.com;
>                   /usr/sbin/tiff2ps -a $FILE | lp -d xerox_p8;
>                   /bin/mv $FILE /shared/fax/;;
> esac
>
> Notice I moved the two semicolons to the last line of the case 
> statement,
> and alse removed the second ttyS4.


Bernard,

Thank you for the tips. I finally figured it out, but I still have a 
question. What finally worked for me is this:

case "$DEVICE" in
         ttyS4)
                 SENDTO=rymes@pobox.com;
                 FILETYPE=pdf;
                 /usr/bin/tiff2ps -a $FILE | lp -d xerox_p8;
                 /bin/cp $FILE /shared/fax;;
esac

Note the '$' in front of 'DEVICE' , as well as the semicolon changes 
you recommended. Also, I changed '/usr/sbin/tiff2ps' to 
'/usr/bin/tiff2ps' All stupid little mistakes, but a little trial and 
eroor, and Voila! now I'm a bona-fide shell scripter....

Also, i move the FILETYPE=pdf line after the SENDTO line since that is 
how the faxrcvd man page specifies. I also used 'pdf' instead of 'PDF'. 
I don't know which change made the difference, but hey.

Finally, I changed the last line to copy the file, not move it. i think 
moving it was messing up the e-mail sending, b/c i was receving blank 
PDF docs until I changed it, and getting this error on the command line:

TIFFOpen: recvq/fax00002.tif: Cannot open.

Does anyone have a recommended way to clean out recvq? I don't think 
that the normal cron tasks do that.

Thanks for the help,

Tom 


____________________ 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@hylafax.org < /dev/null
  *To learn about commercial HylaFAX(tm) support, mail sales@hylafax.org.*




Project hosted by iFAX Solutions