rsync with e-mail notification failure

dear all,

i have script rsync like this :

#!/bin/sh
RSYNC=/usr/bin/rsync
SSH=/usr/bin/ssh
RUSER=root
RHOST=123.123.123.1
INTRPATH=/home/jargo/log/internasional/
INTHPATH=/var/www/international/
IIXRPATH=/home/jargo/log/iix/
IIXHPATH=/var/www/iix/
TTLRPATH=/home/jargo/log/total/
TTLHPATH=/var/www/total/

$RSYNC -az $INTHPATH --include='*log' --include='*old' --exclude='*' -e "$SSH" $RUSER@$RHOST:$INTRPATH
$RSYNC -az $IIXHPATH --include='*log' --include='*.old' --exclude='*' -e "$SSH" $RUSER@$RHOST:$IIXRPATH
$RSYNC -az $TTLHPATH --include='*log' --include='*.old' --exclude='*' -e "$SSH" $RUSER@$RHOST:$TTLRPATH

i won if rsync failure all or or any of rsync commands are, will be in the email as an email notification errors

Cyd

ERR=0
$RSYNC -az $INTHPATH --include='*log' --include='*old' --exclude='*' -e "$SSH" $RUSER@$RHOST:$INTRPATH  || ERR=1
$RSYNC -az $IIXHPATH --include='*log' --include='*.old' --exclude='*' -e "$SSH" $RUSER@$RHOST:$IIXRPATH
|| ERR=1
$RSYNC -az $TTLHPATH --include='*log' --include='*.old' --exclude='*' -e "$SSH" $RUSER@$RHOST:$TTLRPATH || ERR=1
if [ $ERR -eq 1 ] ; then
   echo 'rsync failure' | /usr/bin/mailx -s 'rsync error me@mycompany.com
fi

See if that meets your needs.

the errors message is :

/usr/sbin/rsync-backupmrtg: line 17: [: -eq: unary operator expected

this is my script

if [ $ERR -eq 1 ] ; then
  echo 'rsync failure' | /usr/bin/mailx -s rsync error indracyd@yahoo.co.id
fi

what wrong?
thanks before