[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

report to ftpsync a patch to avoid the use the lockfile programm

Since the lockfile programm used in the new ftpsync requires the
installation of procmail package on debian, and might not be available
on some other platforms, here is a tiny modification to avoid this

Simon Paillard
diff --git a/bin/ftpsync b/bin/ftpsync
index ec06c7c..f827e6a 100755
--- a/bin/ftpsync
+++ b/bin/ftpsync
@@ -233,8 +233,6 @@ FULLLOGS=${FULLLOGS:-"false"}
 # How to rotate our log
 SAVELOG=${SAVELOG:-"savelog -t -c 14"}
-# Lockfile program
 # Our lockfile
@@ -338,7 +336,7 @@ mkdir -p "${TO}/project/trace"
 # Check to see if another sync is in progress
-if ${LOCKFILE} -! -l 43200 -r 0 "${LOCK}"; then
+if [ "`find ${LOCK} -maxdepth 1 -cmin -720`" != ""]; then
         error "Unable to start rsync, lock file still exists"
         exit 1

Reply to: