Opened 16 years ago
Closed 16 years ago
#96 closed defect (fixed)
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 (2)
comment:1 Changed 16 years ago by ivan@…
comment:2 Changed 16 years ago by rjl
- Resolution set to fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
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
fi
if [ -f $LOCKFILE ] ; then
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