Re: two sitecopys at once: use lockfiles
Volker Kuhlmann <[email protected]> Tue, 20 Jun 2006 10:30:05 +1200
| Newsgroups | gmane.comp.web.sitecopy |
|---|---|
| Message-ID | <[email protected]> |
> while a sitecopy --update is > running, one will get a scary message about corrupted files. > > Better would be to use a lock file. Lock the ~/.sitecopy/nurdhost file > with ~/.sitecopy/nurdhost.lock The biggest trouble with lockfiles is to find some heuristics for deciding when they're stale. Imagine you're left with an existing lockfile and no sitecopy is running (eg the power went off) - you're never updating your site again. Ok you could print a msg asking the user to remove it... I found I used sitecopy from a wrapper script anyway, to supply the arguments needed for a site, and to log its activity. From there it would be easy to make use of the program called lockfile from the procmail package. Volker -- Volker Kuhlmann is list0570 with the domain in header http://volker.dnsalias.net/ Please do not CC list postings to me. _______________________________________________ sitecopy maillist - [email protected] http://dav.lyra.org/mailman/listinfo/sitecopy