From c7696b5c7b2e9f033536e57b6cf2beee281ec5bf Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Fri, 1 Jan 2010 22:55:26 +0100 Subject: ftpsync locking have three ways of locking, depending on the bash version old bash (older than 4 :) ) does not have BASHPID variable, nor a good way to find the pid of a backgrounded subshell. so if we have old bash, go the way of guessing if its still running, by comparing the age of the LOCK file or by taking our proc/self target as pid Signed-off-by: Joerg Jaspert --- etc/ftpsync.conf.sample | 3 +++ 1 file changed, 3 insertions(+) (limited to 'etc') diff --git a/etc/ftpsync.conf.sample b/etc/ftpsync.conf.sample index 8310fb2..b96c3d8 100644 --- a/etc/ftpsync.conf.sample +++ b/etc/ftpsync.conf.sample @@ -78,6 +78,9 @@ ## Our own lockfile (only one sync should run at any time) #LOCK="${TO}/Archive-Update-in-Progress-${MIRRORNAME}" +# Timeout for the lockfile, in case we have bash older than v4 (and no /proc) +# LOCKTIMEOUT=${LOCKTIMEOUT:-3600} + ## The following file is used to make sure we will end up with a correctly ## synced mirror even if we get multiple pushes in a short timeframe #UPDATEREQUIRED="${TO}/Archive-Update-Required-${MIRRORNAME}" -- cgit v1.2.3