Skip to content
Snippets Groups Projects
Verified Commit 49ba41bf authored by Evangelos Foutras's avatar Evangelos Foutras :smiley_cat:
Browse files

syncarchive: Tweak rsync options and drop temp dir

This reflects the recent changes made to syncrepo.
parent 4fe427a2
No related branches found
No related tags found
1 merge request!471syncrepo tweaks now that rsync has fixed the stale .~tmp~ issue
Pipeline #9991 passed
#!/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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment