HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
Re: faxrcvd script does not work
Hi,
try using absolute pathnames in your script. I seem to recall that the
hylafax programs use "chroot". Also, put "set -x" at the top of the script
for debug output.
Best Regards,
Mark Wilson
P. Kay Associates Ltd.
On Wed, 5 Jan 2000, Ertan Kucukoglu wrote:
> Hello,
>
> 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
>
> FILE="$1"
>
> 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
> fi
> bash-2.03$
>
> 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 ->
> /ftp/fakslar
> bash-2.03$
>
> 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
> ertank@ozlerplastik.com
>
> P.S. Sorry for this slightly long mail and for my English.
>