diff options
-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 |