diff --git a/snapsend.sh b/snapsend.sh index e910094..2ed237c 100755 --- a/snapsend.sh +++ b/snapsend.sh @@ -112,8 +112,10 @@ case "${interval}" in printf ' ... DONE\n' >> $LOGFILE else # Mail admin - printf 'ERROR snapshot %s does not exist on the local system\n' ${DHOSTSNAP} | mail ${MAILADMIN} -s "snapsend_error $(hostname -f)" + printf 'ERROR Connection SSH or snapshot >%s< does not exist on the local system\n' ${DHOSTSNAP} | mail ${MAILADMIN} -s "snapsend_error $(hostname -f)" printf 'ERROR snapshot %s for %s does not exist on the local system\n' ${DHOSTSNAP} ${dset} >> $LOGFILE + + exit 1 fi # Test if the snapshot was successfully receive on the remote host @@ -126,6 +128,8 @@ case "${interval}" in # Mail admin printf 'ERROR snapshot %s for %s does not exist on the remote host (%s)\n' ${LOCALSNAP} ${dset} ${DHOST} | mail ${MAILADMIN} -s "snapsend_error $(hostname -f)" printf 'ERROR snapshot %s for %s does not exist on the remote host (%s)\n' ${LOCALSNAP} ${dset} ${DHOST} >> $LOGFILE + + exit 1 fi done