![]() |
I have modified FaxDispatch to route a certain number to a certain folder and change to the necessary permissions. My problem is that I need to add at least 10 new numbers(=10 separate folders) to this and possibly more in the future. I am very new to shell scripting. I don't want to end up with a very cluttered FaxDispatch file. Does anyone know if using functions would work and give a very basic idea of how to do this? Here is my FaxDispatch file so far.... Thank you. #!/bin/sh ## $Id: FaxDispatch,v 1.2 2003/05/04 23:49:41 darren Exp $ ## ## Default FaxDispatch file - routes all inbound faxes to FaxMaster as PDF ## ## Consult the faxrcvd(8C) man page for more information ## FAXES=/var/spool/hylafax/recvq OUTPUT=/tmp/fax/ IS=/applications/linux/faxtest/ DATE="$(/bin/date +%F_%k-%M%p)" FILECHANGE=$(/usr/bin/tiff2pdf -o $FILE.pdf -p letter $FILE) NAMECHANGE=$(/bin/mv $FILE.pdf $OUTPUT"$DATE".pdf) case "$SENDER" in *1231234123) mv $OUTPUT"$DATE".pdf $IS; chmod 660 $IS"$DATE".pdf; sudo chown user.group $IS"$DATE".pdf; ;; esac trdavis@xxxxxxxxxxxxx Lee Howard <faxguy@howardsil van.com> To Sent by: hylafax-users@xxxxxxxxxxx hylafax-users-bou cc nce@xxxxxxxxxxx Subject Re: [hylafax-users] routing faxes 12/06/06 04:19 PM to certain folders Aidan Van Dyk wrote: >As a simple rule of thumb, *I* _never_ modify faxrcvd in an >installation, simply because I don't want to have to deal with merging >in changes. If you can do it in faxrcvd, you can do it in FaxDispatch >(because it is just a shell file sourced by faxrcvd). If I don't want >any of the following faxrcvd functionality (e-mailing it), a simple >"exit" in FaxDispatch is sufficient. > Yes, it's an unadvisable business to modify bin/faxrcvd. Instead, if the default faxrcvd behavior is close to but not exactly what I want, and if that behavior is *not* deliberately modifiable by the default faxrcvd (like, setting SENDTO or FILETYPE or NOTIFY_FAXMASTER, for examples) - then rewriting default faxrcvd functionality modified by my needs inside-of FaxDispatch followed by an "exit" amounts to a whole lot of work that I avoid by simly copying the default faxrcvd to, say, etc/faxrcvd.custom, making the modifications there, and then setting "FaxRcvdCmd: etc/faxrcvd.custom" in my modem config files. This also avoids dealing with merging in changes over upgrades and reinstallations. 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* ---------------------------------------------------------------------------------------------------- CONFIDENTIALITY NOTICE This e-mail and the files transmitted with it are intended solely for the use of addressee. If you are not the intended recipient, or a person responsible for delivering this e-mail to the intended recipient, you are hereby notified that you have received this e-mail in error and that any use, dissemination, distribution, forwarding, printing, or copying of this email is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by replying to this e-mail and deleting it from your computer. ____________________ 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*