diff --git a/mirrorsync.sh b/mirrorsync.sh index ee92aa9..22f7d4b 100644 --- a/mirrorsync.sh +++ b/mirrorsync.sh @@ -32,7 +32,6 @@ # -rsync="/usr/bin/rsync" # You can change v to q if you do not want detailed logging opts=(-vrlptDSH --exclude="*.~tmp~" --delete-delay --delay-updates) @@ -55,7 +54,7 @@ logfile="$0.log" # Check if the filelistfile has changed on upstream mirror # and exit if it is still the same -checkresult=$(${rsync} --no-motd --dry-run --out-format="%n" "${src}/${filelistfile}" "${dst}/${filelistfile}") +checkresult=$(rsync --no-motd --dry-run --out-format="%n" "${src}/${filelistfile}" "${dst}/${filelistfile}") if [[ -z "$checkresult" ]]; then printf "%s unchanged. Not updating at %(%c)T\n" "$filelistfile" -1 >> "$logfile" 2>&1 logger -t rsync "Not updating ${mirrormodule}: ${filelistfile} unchanged." @@ -78,8 +77,7 @@ fi printf '%s\n' "$$" > "$lockfile" printf "Started update at %(%c)T\n" -1 >> "$logfile" 2>&1 logger -t rsync "Updating ${mirrormodule}" -${rsync} "${opts[@]}" "${src}/" "${dst}/" >> "$logfile" 2>&1 +rsync "${opts[@]}" "${src}/" "${dst}/" >> "$logfile" 2>&1 logger -t rsync "Finished updating ${mirrormodule}" printf "End: %(%c)T\n" -1 >> "$logfile" 2>&1 rm -f $lockfile -