Implementing basic exception on sync

This commit is contained in:
Amber 2022-10-25 09:16:37 +02:00
parent 1bf9a20e74
commit da4359b45d
1 changed files with 2 additions and 1 deletions

View File

@ -29,5 +29,6 @@ sync() {
# PUSH TO REMOTE - and PULL FROM REMOTE swapping `src` with `dest`
#echo "executing rsync -aPu --log-file=$LOGFILE -e ssh $otheropts $src $dest"
# NOTE REMOTEDIR ALREADY EXISTS IN DESTINATION
rsync -aPu --log-file=$LOGFILE -e ssh $otheropts $src $dest 1>/dev/null
rsync -aPu --log-file=$LOGFILE -e ssh $otheropts $src $dest 1>/dev/null || \
echo 'sync error probabily for some reason rsync is broken, raise Exception and quit' && exit 1
}