Ticket #96 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

Add lockfile to process-quarantine.pl

Reported by: rjl Owned by: rjl
Priority: normal Milestone: 1.0.0 RC6
Component: Perl scripts Version: 1.0.0 RC5
Severity: normal Keywords: lock lockfile process-quarantine.pl
Cc:

Description

The process-quarantine.pl script should check for the presence of a lockfile before running, and write one if none exists. This should prevent overlapping runs of the script when a scheduled job runs long enough to interfere with the next scheduled run.

Change History

Changed 7 years ago by ivan@…

In the meantime - and as a workaround - I use a wrapper script such as :

*** SCRIPT *** #!/bin/bash

LOCKFILE='/var/run/amavis/pq.lock'

if [ "x$1" = "xcleanup" ] ; then

rm -f $LOCKFILE exit 0

fi

if [ -f $LOCKFILE ] ; then

exit 0

fi

touch $LOCKFILE

/var/amavisd/maia/scripts/process-quarantine.pl

rm -f $LOCKFILE *** END SCRIPT ***

This script is called with "cleanup" at boot time so that any spurious lockfile is removed

Of course, the lockfile and the script must be adjusted to match the local installation.

--Ivan

Changed 7 years ago by rjl

  • status changed from new to closed
  • resolution set to fixed

Fixed in [619].

Note: See TracTickets for help on using tickets.