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