HylaFAX The world's
most advanced open source fax server
Re: faxrcvd script does not work
Alan Sparks schrieb:
> Linking outside the spool may not work... I think you're chrooted to the
> spool (someone correct me if I'm wrong)...
> If that's not it, check your paths to executables -- running by hand, you
> inherit your shell's PATH, which you wouldn't if HylaFAX is running the
I would bet on the second reason, path to executables.
As there is no path setting in your script it will probably fail
finding the mv and the date command, which are executables and
not shell-builtin-commands, you can verify that by typing "which mv",
what'll give you the path to mv. on my linux-system they live in /bin/
have a nice day
> -----Original Message-----
> From: Ertan Kucukoglu <firstname.lastname@example.org>
> To: email@example.com <firstname.lastname@example.org>
> Date: Wednesday, January 05, 2000 1:36 PM
> Subject: flexfax: faxrcvd script does not work
> >I have 4.0pl2 version of Hylafax. and FreeBSD 3.3 OS.
> >I tried to move incoming faxes from recvq dir to somewhere else. I had
> >to write one program. That program checkes if the given directories are
> >present. If not it creates them and returns 0 on success other number on
> >fail. My directory tree likes that:
> >bash-2.03$ cd /var/spool/fax/bin/
> >bash-2.03$ ls
> >faxrcvd mymkdir pollrcvd ps2fax.imp
> >faxrcvd.bak notify ps2fax tiff2fax
> >faxrcvd~ notify.awk ps2fax.dps token
> >mkcover pcl2fax ps2fax.gs wedged
> >And I changed the script as below:
> >bash-2.03$ cat faxrcvd
> >#! /bin/sh
> >if [ -f $FILE ]; then
> > A=`date '+%Y/%m/%d'`
> > echo "Dizinler kontrol ediliyor..."
> > if bin/mymkdir fakslar `date '+%Y'` `date '+%m'` `date '+%d'`; then
> ># MYFILE=recvq/`token $FILE`
> > echo "Dosya adi: $FILE"
> > echo "Tasindigi yer: $A"
> > mv $FILE fakslar/$A/
> > fi
> >The fakslar directory is a link to somewhere under my ftp directory.
> >bash-2.03$ ls -l /var/spool/fax/fakslar
> >lrwxr-xr-x 1 root dialer 12 Jan 4 16:01 /var/spool/fax/fakslar ->
> >I send a fax to myself and it did not move the required files. If I run
> >the script by hand it runs and does its job.
> >I replace the old sript file and put my script at the end of the
> >original script. Tried to send a fax to myself and:
> >1. I receive 'fax received from' mail delivered.
> >2. My script does not work.
> >Any ideas about that?
> >Ertan Kucukoglu
> >P.S. Sorry for this slightly long mail and for my English.