util/recvstats.sh
util/faxcron.sh
util/pagesizes
+ util/archive.sh
util/faxrcvd.sh
util/mkcover.sh
util/notify.sh
util/pagesizes.in \
util/notify.awk \
util/faxcron.sh.in \
+ util/archive.sh \
util/faxrcvd.sh \
util/mkcover.sh \
util/notify.sh \
} else if (archiving &&
strncmp(req->doneop, "archive", 7) == 0) {
/*
- * Job should be archived, create an entry in the
- * archive directory that contains the job's state,
- * references to the documents, and the session logs.
+ * Job should be archived, pass the jobid
+ * value to the archive script for archiving.
*/
if (verbose)
printf("JOB %s: archive (%s)%s.\n"
* Archive completed fax job.
*/
void
-faxQCleanApp::archiveJob(const FaxRequest&)
+faxQCleanApp::archiveJob(const FaxRequest& req)
{
+ // hand the archiving task off to the archiving command
+ fxStr cmd("bin/archive"
+ | quote | req.jobid | enquote
+ );
+ runCmd(cmd, true);
}
/*
.TP 10
.B \-a
Enable job archiving support.
-\fINB: v4.0 does not include support for job archiving.\fP
.TP 10
.BI \-j " secs"
Set the job age threshold (in seconds)
.SH OPTIONS
.TP 10
.B \-a
-Display the status of all jobs that are stored in the
+Display the contents of the
.B archive
directory on the server machine
-(\fINB: this will always be empty for v4.0 because there is no
-support for job archiving\fP).
.TP 10
.B \-d
Display the status of all jobs that have completed; i.e. those
schedules facsimile for immediate delivery. Time should be given
in the user's local time.
.TP
+.BI \-A
+Archive the job on the server according to the
+bin/archive script when the job is done.
+.TP
.BI \-b " speed"
Transmit facsimile documents using a signalling rate that is
constrained to be at least
f none @SPOOL@/bin/tiff2fax=../util/tiff2fax.sh 0755 @SYSUID@ @SYSGID@
f none @SPOOL@/bin/notify=../util/notify.sh 0755 @SYSUID@ @SYSGID@
f none @SPOOL@/bin/notify.awk=../@SRCDIR@/util/notify.awk 0444 @SYSUID@ @SYSGID@
+f none @SPOOL@/bin/archive=../util/archive.sh 0755 @SYSUID@ @SYSGID@
f none @SPOOL@/bin/faxrcvd=../util/faxrcvd.sh 0755 @SYSUID@ @SYSGID@
f none @SPOOL@/bin/pollrcvd=../util/pollrcvd.sh 0755 @SYSUID@ @SYSGID@
f none @SPOOL@/bin/mkcover=../util/mkcover.sh 0755 @SYSUID@ @SYSGID@
int verbose = 0;
SendFaxJob& proto = getProtoJob();
db = new FaxDB(tildeExpand(dbName));
- while ((c = Sys::getopt(argc, argv, "a:b:B:c:C:d:f:F:h:i:I:k:M:P:r:s:t:T:U:V:W:x:X:y:Y:12lmnpvwDENR")) != -1)
+ while ((c = Sys::getopt(argc, argv, "a:b:B:c:C:d:f:F:h:i:I:k:M:P:r:s:t:T:U:V:W:x:X:y:Y:12lmnpvwADENR")) != -1)
switch (c) {
case '1': // restrict to 1D-encoded data
proto.setDesiredDF(0);
case 'a': // time at which to transmit job
proto.setSendTime(optarg);
break;
+ case 'A': // archive job
+ proto.setDoneOp("archive");
+ break;
case 'b': // minimum transfer speed
proto.setMinSpeed(optarg);
break;
${PUTSUPD} -m 755 -src tiff2fax.sh -O tiff2fax
${PUTSUPD} -m 755 -src notify.sh -O notify
${PUTSUPD} -m 444 -src ${SRCDIR}/notify.awk -O notify.awk
+ ${PUTSUPD} -m 755 -src archive.sh -O archive
${PUTSUPD} -m 755 -src faxrcvd.sh -O faxrcvd
${PUTSUPD} -m 755 -src pollrcvd.sh -O pollrcvd
${PUTSUPD} -m 755 -src mkcover.sh -O mkcover
-${RM} -f pagesizes xferfaxstats.sh recvstats.sh faxcron.sh \
faxrcvd.sh mkcover.sh notify.sh pcl2fax.sh pollrcvd.sh \
ps2fax.dps.sh ps2fax.gs.sh ps2fax.imp.sh tiff2fax.sh \
- wedged.sh
+ wedged.sh archive.sh
#define valeq(a,b) (strcasecmp(a,b)==0)
#define valneq(a,b,n) (strncasecmp(a,b,n)==0)
+void SendFaxJob::setDoneOp(const char* v) { doneop = v; }
+
bool
SendFaxJob::setNotification(const char* v0)
{
CHECKPARM("USETAGLINE", true)
CHECKPARM("TAGLINE", tagline)
}
+ if (doneop == "archive") {
+ CHECKPARM("DONEOP", "archive")
+ }
CHECKPARM("NOTIFY",
notify == when_done ? "done" :
notify == when_requeued ? "done+requeue" :
fxStr jobid; // job ID
fxStr groupid; // job-group ID
fxStr jobtag; // user-specified job identifier
+ fxStr doneop; // job doneop control
FaxNotify notify; // job notification control
fxStr mailbox; // mail address for notification
const fxStr& getJobID(void) const;
const fxStr& getGroupID(void) const;
+ void setDoneOp(const char*);
+
/*
* Job notification.
*/