diff options
author | Remi Collet <remi@remirepo.net> | 2025-01-22 12:12:35 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2025-01-22 12:12:35 +0100 |
commit | 2ffe423ca28c950c943446d8ebdda03d6978efd7 (patch) | |
tree | 9c3e2ad84b20141659666229b5042b4f93839ad6 | |
parent | cd5f31eecef4f9b17f345e36923cce15c352a8eb (diff) |
-rw-r--r-- | mirrorsync | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -49,6 +49,8 @@ src="rsync://rpms.remirepo.net" # Your local path. Change to whatever fits your system. dst=/mnt/RepoSync # $mirrormodule is also used in syslog output. +# ${dst}/${mirrormodule}/enterprise MUST exists +# ${dst}/${mirrormodule}/fedora MUST exists 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 @@ -76,6 +78,14 @@ rsync_run(){ fi; } +if [ ! -d ${dst1} ]; then + echo "${dst1} directory does not exist" + exit 1 +fi +if [ ! -d ${dst2} ]; then + echo "${dst2} directory does not exist" + exit 1 +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 |