Verified Commit 49ba41bf authored by Evangelos Foutras's avatar Evangelos Foutras 🐱
Browse files

syncarchive: Tweak rsync options and drop temp dir

This reflects the recent changes made to syncrepo.
parent 4fe427a2
Pipeline #9991 passed with stage
in 33 seconds
#!/bin/bash
target="/srv/archive"
tmp="/srv/syncarchive-tmp"
lock="/var/lock/syncarchive.lck"
source_url='rsync://rsync.archlinux.org/archive'
lastupdate_url='https://archive.archlinux.org/repos/last/lastupdate'
[ ! -d "${target}" ] && mkdir -p "${target}"
[ ! -d "${tmp}" ] && mkdir -p "${tmp}"
exec 9>"${lock}"
flock -n 9 || exit
rsync_cmd() {
local -a cmd=(rsync -rtlH --safe-links --delete-after ${VERBOSE} "--timeout=600" "--contimeout=60" -p \
--delay-updates --no-motd "--temp-dir=${tmp}")
local -a cmd=(rsync -rlptH --safe-links --delete-delay --delay-updates
"--timeout=600" "--contimeout=60" --no-motd)
if stty &>/dev/null; then
cmd+=(-h -v --progress)
......
Supports Markdown
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