masync log
This commit is contained in:
parent
799a7078b2
commit
e9082e375f
2
masync
2
masync
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user