X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=inline;f=config%2Fdebian%2Funchecked.functions;fp=config%2Fdebian%2Funchecked.functions;h=87fbda0a024a8f5a44775277fd3e34c196a548a1;hb=b2d06df451fcf23b97f572a4253ccfbd26d58f45;hp=0000000000000000000000000000000000000000;hpb=8f72f604a89bb3ff3dba82521dd9fc474208f189;p=dak.git diff --git a/config/debian/unchecked.functions b/config/debian/unchecked.functions new file mode 100644 index 00000000..87fbda0a --- /dev/null +++ b/config/debian/unchecked.functions @@ -0,0 +1,14 @@ +# -*- mode:sh -*- + +function precronscript() { + # Do not run during dinstall + if [[ -e ${LOCK_DAILY} ]]; then + exit 0; + fi + # only run one cron.unchecked and also lock against hourly (newoverview) + if ! lockfile -r8 ${LOCK_UNCHECKED} 2> /dev/null; then + # log "aborting cron.unchecked because $LOCK_UNCHECKED has already been locked" + exit 0 + fi + TMPFILES="${TMPFILES} ${LOCK_UNCHECKED}" +} \ No newline at end of file