masync log

This commit is contained in:
Amber 2022-12-02 16:33:38 +01:00
parent 799a7078b2
commit e9082e375f
2 changed files with 4 additions and 2 deletions

2
masync
View File

@ -161,6 +161,7 @@ startsyncpath() {
snapshotfile=$(format ${SNAPSHOTFILE} hash=${localpath_hash})
#tempqueuefile=~/.syncdir_${localpath_hash}.queue
tempqueuefile=$(format ${TMPQUEUEFILE} hash=${localpath_hash})
#syncloopfile=$(format ${SYNCLOOPFILE} hash=${localpath_hash})
if [ -e ${snapshotfile} ]; then
echo "Founded snapshot file: ${snapshotfile} checking files to remove..."
@ -169,6 +170,7 @@ startsyncpath() {
rm -f ${snapshotfile}
fi
## ensure local computer sends eventually new files adding a fake line in the queue
#echo -e "${PURPLE}[DUMMY PUSH]${ENDCOLOR} to remote" >> ${syncloopfile}
echo "Startsync DUMMY ACTION" >> ${tempqueuefile}
echo -e "${GREEN}DONE${ENDCOLOR}"
loopsyncpath $1

View File

@ -72,7 +72,7 @@ synccycle() {
while [ $ndeletes -gt 0 ]; do
echo -e "${PURPLE}[DELETE]${ENDCOLOR} at remote: ${RED}$(head -n $ndeletes ${tmpqueuedeletes} | tr '\n', ' ')${ENDCOLOR}"
ssh $REMOTEHOST "rm -rf $(head -n $ndeletes ${tmpqueuedeletes} | tr '\n', ' ')"
echo -e " ${PURPLE}[DONE]${ENDCOLOR}"
echo -e "${PURPLE}[DONE]${ENDCOLOR}"
# remove the first ndeletes lines
flock $lock_deletes
tmpfile=$(mktemp)
@ -90,7 +90,7 @@ synccycle() {
while [ $nqueue -gt 0 ]; do
#echo "${tmpqueuefile} not empty consume ${nqueue} updates in queue"
sync $LOCALPATH_HASH $LOCALPATH $REMOTEPATH
echo -e "${PURPLE}[DONE]${ENDCOLOR}"
echo -e "${PURPLE}[PUSH DONE]${ENDCOLOR}"
# remove the first nqueue lines from queue
flock $lock_queue
tmpfile=$(mktemp)