Commit dde2bb8a authored by Jelle van der Waa's avatar Jelle van der Waa 🚧

Merge branch 'syncrepo_check' into 'master'

Lock before deleting files

See merge request !307
parents f32f3995 73bf287a
Pipeline #5277 passed with stage
in 51 seconds
......@@ -59,12 +59,12 @@ lastupdate_url=''
[ ! -d "${target}" ] && mkdir -p "${target}"
[ ! -d "${tmp}" ] && mkdir -p "${tmp}"
# Cleanup any temporary files from old run that might remain.
find "${target}" -name '.~tmp~' -exec rm -r {} +
exec 9>"${lock}"
flock -n 9 || exit
# Cleanup any temporary files from old run that might remain.
find "${target}" -name '.~tmp~' -exec rm -r {} +
rsync_cmd() {
local -a cmd=(rsync -rtlH --safe-links --delete-after ${VERBOSE} "--timeout=600" "--contimeout=60" -p \
--delay-updates --no-motd "--temp-dir=${tmp}")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment