From cd5f31eecef4f9b17f345e36923cce15c352a8eb Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 22 Jan 2025 12:04:39 +0100 Subject: mirrorsync: re-order --- mirrorsync | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/mirrorsync b/mirrorsync index 7bf2877..083b758 100644 --- a/mirrorsync +++ b/mirrorsync @@ -32,20 +32,6 @@ # SOFTWARE. # -# Find rsync in default path -rsync_run(){ - if command -v rsync >/dev/null; then - command rsync "$@"; - else - command -p rsync "$@"; - fi; -} - -# You can change v to q if you do not want detailed logging -# You may also add additional excludes if you don't want to provide certain -# repositories or architectures. -opts=(-avSH --exclude="*.~tmp~" --delete-delay --delay-updates) - # Please use a mirror geographically close to you for initial sync, # or if you are hosting a private mirror (not publicly available). # @@ -64,6 +50,10 @@ src="rsync://rpms.remirepo.net" dst=/mnt/RepoSync # $mirrormodule is also used in syslog output. mirrormodule="Remi" +# You can change v to q if you do not want detailed logging +# You may also add additional excludes if you don't want to provide certain +# repositories or architectures. +opts=(-avSH --exclude="*.~tmp~" --delete-delay --delay-updates) ##### END OF TO BE ADAPTED ##### # Enterprise repo @@ -77,6 +67,15 @@ datefile="date" lockfile="$0.lockfile" logfile="$0.log" +# Find rsync in default path +rsync_run(){ + if command -v rsync >/dev/null; then + command rsync "$@"; + else + command -p rsync "$@"; + fi; +} + # Always pull the index.html to ensure the latest. curl/wget would still use same bandiwdth to check if the page changed even # if we aren't going to save a new copy wget https://rpms.remirepo.net/index.html -O ${dst}/${mirrormodule}/index.html >> "$logfile" 2>&1 -- cgit