HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
Re: problems with faxrcvd script...
Hello,
hmm... your comment on it being in bin(and then needing a
bin/<shell-script>) made me think. I remembered that this is a chroot'ed
system we're running here. That makes me think that my running
/home/path/to/my/home/directory/bin/<shell-script> won't work.
Methinks Iwill have to move my scripts and try it again(in the morning) I
will keep you all updated, of course, thanks for all the feedback :)
(one thing though--if my shell script is running in a chroot'ed system, i
won't be able to copy files out from it to the regular file systems,
right?(I had thought this would be a problem, 20 seconds more thought
tells me I can symlink into it from the outside world. nevermind,
question answered by self))
cheers all,
Josh
On Thu, 23 Jul 1998, Hong Kong Observatory wrote:
> Hello Josh :
>
> I also required to process the incoming FAX such as converting to
> other format, updating WEB pages etc. . I did similar thing as what you
> did and it works. I put my stuff near the beginning of 'faxrcvd'. Here is
> exectly what I did :
>
> #
> # Check the sender's TSI and setup to dispatch
> # facsimile received from well-known senders.
> #
> SENDER="`$INFO $FILE | $AWK -F: '/Sender/ { print $2 }' 2>/dev/null`"
>
> # Check for CLK fax input K.S.Wat 06-Feb-98
> if [ -f etc/ckCLKfaxinput ]
> then
> . etc/ckCLKfaxinput
> fi
> #
>
> # Check for MTC FAX input
> if [ -f etc/ckMTC ]
> then
> . etc/ckMTC
> fi
>
> SENDTO=
> if [ -f etc/FaxDispatch ]; then
> . etc/FaxDispatch # NB: FaxDispatch sets SENDTO based on $SENDER
> fi
>
> I added my stuff after setting the SENDER variable so that my scripts
> can process input based on sender. Also note that the working directory of
> the script 'faxrcvd' is the FAXSPOOL directory, if you put your script in
> the same directory as 'faxrcvd' then you should insert the line
> 'bin/your_script'.
>
> On Wed, 22 Jul 1998, Josh Duncan wrote:
>
> > Hello all,
> >
> > Well, I did as you all told and looked into the faxrcvd script to post
> > process incoming faxes. i thought it should be weasy to do what I wanted
> > to do, but alas no.
> >
> > what i need to do is insert three lines, one line to copy the incoming tif
> > file to a temporary directory, one to do conversion on it(by adding a line
> > to execute a shell script) and a third line to execute a shellscript to
> > create a web page index.
> >
> > now, I thought the best place to put it would be after all the mail stuff
> > for a successful mreciept. that is, the faxrcvd script would mail the
> > user saying hey it worked, then my scripts woudl run and convert the tif
> > to a pdf, and then make a web index of all recieved pdfs.
> >
> > so here's where i looked to put it:
> >
> > echo ""
> > $FAX2PS $FILE 2>/dev/null
> > echo ""
> > echo "--$MIMEBOUNDARY--"
> > ) | 2>&1 $SENDMAIL -ffax -oi $SENDTO
> > fi
> > ---my stuff inserted here-----
> > else
> > #
> > # Generate notification mail for a failed attempt.
> > #
> >
> >
> > now, i put my three lines there, but nothing gets executed. all the mail
> > still works just fine, but nothing that I have added works correctly. so
> > then i tried putting my stuff closer to the "front" of the faxrcvd script,
> > right here:
> > if [ -f $FILE ]; then
> > #
> > # Check the sender's TSI and setup to dispatch
> > # facsimile received from well-known senders.
> > #
> > ---mine go here---
> > SENDER="`$INFO $FILE | $AWK -F: '/Sender/ { print $2 }' 2>/dev/null`"
> > SENDTO=
> > if [ -f etc/FaxDispatch ]; then
> >
> >
> > again, everything from the default works, as far as email goes, but
> > nothing i have added gets executed.
> >
> > anyone have any ideas on how i am supposed to do this? I could have sworn
> > I understood shell scripts, and the syntax of this shell script in
> > particular, but this has got me totally stumped.
> >
> > if this is an easy solution, my apologies in advance for any wasted
> > bandwidth.
> >
> > also, thanks in advance, for any help you can give me.
> >
> > Josh
> >
> > ----
> > Josh Duncan
> > duncan@msmd.org
> >
> > God's like Comet(TM), nothing cleans better.
> >
> >
>
> K.S.Wat SSA(D)12
> Computer Division,
> Hong Kong Observatory.
>
>
----
Josh Duncan
duncan@msmd.org
God's like Comet(TM), nothing cleans better.