procmail
[Top] [All Lists]

using LOCKFILE to update suite of procmailrc's

2003-03-16 18:45:21
Hello, I wanted to see if this recipe seemed like a good method to update the
suite of procmailrc's that are on a client's system that I do not have the
password to.

I'm relying on the assumption that no other instances of procmail will start
up while LOCKFILE is set.  The only thing that's bothering me is that I'm not
sure how to guarantee that this recipe doesn't start up if a previous instance
of procmail is not done.  Ordinarily, I want it to be able to run multiple
instances concurrently, ie as usual, *unless* I'm updating the suite.

:0
* ^TO_update(_at_)domain(_dot_)tld
{
  LOGFILE=updatelog
  LOCKFILE=procmail.lock

    # get the url of the source directory
    RCSRC=`formail -zx X-rcsrc: < rcsrc`

    # fetch the other procmailrc's
    WGET=`wget -r -nd -N -l 1 $RCSRC`

  LOCKFILE

  LOGFILE=maillog.update

  :0hw
  | ( formail -I "From " \
            -I "Subject: wget -r -nd -N -l 1 $RCSRC" \
            -I "From: update(_at_)domain(_dot_)tld " \
            -I "To: jeff(_at_)orrok(_dot_)com" ; \
    echo ; cat updatelog ) | $SENDMAIL $SENDMAILFLAGS -t
}

SWITCHRC=procmailrc.master  

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • using LOCKFILE to update suite of procmailrc's, Jeff Orrok <=