assert isset lockfile
# timeout value in seconds
- local timeout=60
- timeout=$(( ${timeout} * 10 ))
+ local timeout=120
+ timeout=$(( ${timeout} * 4 ))
- log DEBUG "Acquiring lock '${lockfile}'."
+ log DEBUG "Acquiring lock '${lockfile}'"
local free="false"
while [ ${timeout} -gt 0 ]; do
fi
timeout=$(( ${timeout} - 1 ))
- sleep 0.1
+ sleep 0.25
done
- assert ${free} "Could not acquire lock '${lockfile}'."
+ assert ${free} "Could not acquire lock '${lockfile}'"
# Write out pid to the lockfile and make sure that
# nobody else can access it.
lock_release() {
local lockfile="${1}"
- log DEBUG "Releasing lock '${lockfile}'."
+ log DEBUG "Releasing lock '${lockfile}'"
# Remove the lockfile (okay if it does not exist).
rm -f ${lockfile}