/var/spool/hylafax/bin/archive is in hylafax-server 3:6.0.6-5.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #! /bin/bash
#
# This script is called by faxqclean to archive the job
#
JOBID=$1
ARCHIVETO=archive/$JOBID
FILETYPES="^!postscript:|^!tiff:|^!pcl:|^!pdf:|^!data:"
QFILE=doneq/q$JOBID
COMMLOGS=`find log -type f -name "c*" -print | xargs -n50 grep -l "SEND FAX: JOB $JOBID"`
DOCS=`grep -E $FILETYPES $QFILE | sed 's/.*://g'`
NUMBER=`grep "^number:" $QFILE | sed 's/^number://g'`
#
# Default archiving is to create a directory in the archive directory
# named as the job number, move the q file and the doc files into it, and
# copy the associated logs and info file there, also.
#
mkdir $ARCHIVETO
mv $QFILE $ARCHIVETO
for log in $COMMLOGS; do cp $log $ARCHIVETO; done
for doc in $DOCS; do cp $doc $ARCHIVETO; done
if [ -r info/$NUMBER ]; then cp info/$NUMBER $ARCHIVETO; fi
|