Implementing basic exception on sync
This commit is contained in:
parent
1bf9a20e74
commit
da4359b45d
@ -29,5 +29,6 @@ sync() {
|
|||||||
# PUSH TO REMOTE - and PULL FROM REMOTE swapping `src` with `dest`
|
# PUSH TO REMOTE - and PULL FROM REMOTE swapping `src` with `dest`
|
||||||
#echo "executing rsync -aPu --log-file=$LOGFILE -e ssh $otheropts $src $dest"
|
#echo "executing rsync -aPu --log-file=$LOGFILE -e ssh $otheropts $src $dest"
|
||||||
# NOTE REMOTEDIR ALREADY EXISTS IN DESTINATION
|
# 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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user