diff options
author | Joerg Jaspert <joerg@debian.org> | 2010-01-01 22:55:26 +0100 |
---|---|---|
committer | Joerg Jaspert <joerg@debian.org> | 2010-01-01 22:57:57 +0100 |
commit | c7696b5c7b2e9f033536e57b6cf2beee281ec5bf (patch) | |
tree | 5fd286b87fcffc0db1f90eed315121f32ba91649 /etc/ftpsync.conf.sample | |
parent | dd604ee0d2ad2a6d06aed3171fddabbd3865245b (diff) |
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 <joerg@debian.org>
Diffstat (limited to 'etc/ftpsync.conf.sample')
-rw-r--r-- | etc/ftpsync.conf.sample | 3 |
1 files changed, 3 insertions, 0 deletions
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}" |