trigger command on successful upload?

Eberhard Moenkeberg emoenke at gwdg.de
Tue Jun 15 14:12:50 GMT 2004


Hi,

On Tue, 15 Jun 2004 PEnright at braums.com wrote:

> I think this would be a useful feature. I can think of how I could use a
> feature like that. If you are successful let me know.

rsync has wonderful precise return codes. "man rsync" will tell.
You can already do somehing like this:

  rsync ${OPTS} ${SRC} ${DST} >>${PROT} 2>&1
  RC=$?
  if test "${RC}" = "0" -o "${RC}" = "23"; then
    echo "normal termination."
  elif test "${RC}" = "10"; then
    echo "no connection."
  elif test "${RC}" = "24"; then
    echo "OK, but some file(s) vanished."
  fi

and distinguish many more cases.

Cheers -e
-- 
Eberhard Moenkeberg (emoenke at gwdg.de, em at kki.org)


More information about the rsync mailing list