diff options
author | Remi Collet <remi@remirepo.net> | 2025-01-22 12:04:39 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2025-01-22 12:04:39 +0100 |
commit | cd5f31eecef4f9b17f345e36923cce15c352a8eb (patch) | |
tree | e3ee27fdd3c5e64a8dcbbdf1a25409dcba1de3c8 | |
parent | bd8d45aa752098dde805551e860994defb3184d2 (diff) |
mirrorsync: re-order
-rw-r--r-- | mirrorsync | 27 |
1 files changed, 13 insertions, 14 deletions
@@ -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 |