anchor.diff:  
   START_UPLOAD=$(date +%s%3N)
   
  +EXITCODE=0
   for TARGET in ${TARGETS}; do
     log "user.info" "Started uploading to ${TARGET}"
   
  -  rsync -az --exclude 'lost+found' ${MIRROR_ROOT}/. ${TARGET}:/srv/mirror_data
  -
  -  log "user.info" "Finished uploading to mirror ${TARGET}"
  +  if rsync -az --exclude 'lost+found' ${MIRROR_ROOT}/. ${TARGET}:/srv/mirror_data; then
  +    log "user.info" "Finished uploading to mirror ${TARGET}"
  +  else
  +    EXITCODE=1
  +    log "user.crit" "Uploading mirror ${TARGET} failed with exit code: $EXITCODE"
  +  fi
   done
   
   STOP_UPLOAD=$(date +%s%3N)
  
positive.code:   logger -p ${1} -t ${PROGRAM_NAME} "${2}"
  }
  
  trap nagios_passive EXIT
  
  if [ -z "${TARGETS}" ]; then
  
negative.code: 
  log "user.info" "Finished synchronising to GOV.UK mirrors"
  
  if [ $EXITCODE -eq 0 ]; then
    NAGIOS_CODE=0
    NAGIOS_MESSAGE="OK: GOV.UK mirror synchronised successfully"
  fi
  exit $EXITCODE
  