From da4359b45d527ad2f0f2c1766dca98191653d2d1 Mon Sep 17 00:00:00 2001 From: Amber Date: Tue, 25 Oct 2022 09:16:37 +0200 Subject: [PATCH] Implementing basic exception on sync --- .synccmd.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.synccmd.sh b/.synccmd.sh index 2db5886..569cbe8 100755 --- a/.synccmd.sh +++ b/.synccmd.sh @@ -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 }