Samba FAX: Need script for mgetty+sendfax solution..

Tore Høivaag Larsen larsent at online.no
Sun Nov 2 09:35:12 GMT 1997


Hi,
    To avoid reinventing the wheel I need to know whether anyone have
made a script (bash) that pick out relevant information
about the latest job and logs it on a printer attached to the samba fax
host.

I'd like to pick out info from the files:

/var/spool/fax/outgoing/printfax.log
/var/spool/mail/<user> or /var/spool/fax/outgoing/faxrunqd.asc
/var/spool/fax/acct.log
/var/spool/fax/faxrunqd.log

and get a result like this:

[11/01/97] 22:48:16 Fax from THL(192.168.1.4) by thl to RH Maisavarre
(77777777) spooled
F000007 [01.11.97 22:52]
         Using /dev/cua3
F000007 [01.11.97 22:52]
         Using /dev/cua3
          spawned child (PID 733)
Sending f1.g3
Sending f2.g3
F000007 [01.11.97 22:53]
          Child returns (PID 733)
SUCCESS: JOB F000006 BY thl TO 77777777 TRIES 1 TIME 01.11.97 22:49 ->
01.11.97 22:53
TIME ELAPSED = 3 minutes   ONLINE = 1 minute    COST = 3 Nkr

I don't want a script that uses lots of CPU time to check whether a file
has changed and the do 'tail -1' on it.
I tried that, but it consumes to much CPU time.

Is there better way to do this?

Sincerely,
Tore
--
Tore H. Larsen                                      Scase AS
Engineer                                                Eidsvågbakken 1
E-mail: tore.h.larsen at scase.no               N-5080 Eidsvåg
Vc: +47-55951200  Fax: +47-55257120    Bergen - Norway




More information about the samba mailing list