From a1169c79a6da7c8db95085f6fa7d40f1dc6d021d Mon Sep 17 00:00:00 2001 From: notanamber Date: Mon, 31 Oct 2022 16:07:07 +0000 Subject: [PATCH] comment and trying to start clena --- .synccmd.sh | 2 +- masync | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.synccmd.sh b/.synccmd.sh index 569cbe8..bd515eb 100755 --- a/.synccmd.sh +++ b/.synccmd.sh @@ -30,5 +30,5 @@ sync() { #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 || \ - echo 'sync error probabily for some reason rsync is broken, raise Exception and quit' && exit 1 + echo 'generic sync error. Probabily for some reason rsync is broken, raise Exception and quit' && exit 1 } diff --git a/masync b/masync index ce58258..e9df2ae 100755 --- a/masync +++ b/masync @@ -104,6 +104,15 @@ feeddeletes() { done } +########################################## +# the init action is composed by +# 1. the mirroring of the remote folder. +# Basycally an `rsync` that uses the remote folder as the source +# and the local folder as the destination +# +# 2. creating a sync task (a line) in the file that contains the list of all sync +# 3. starting the loop listening for the changes in local folder +########################################## initsyncpath() { echo 'Starting initial sync...'