mirror of
https://github.com/jbowdre/library-syncer.git
synced 2024-11-23 02:12:17 +00:00
Compare commits
No commits in common. "693d93f649b4a5879a416886310d845c480af2c6" and "8d299a752f4a3b96f591cdd2fc176fe85979f0be" have entirely different histories.
693d93f649
...
8d299a752f
3 changed files with 4 additions and 8 deletions
|
@ -10,11 +10,7 @@ fi
|
||||||
|
|
||||||
echo -e "[$(date +"%Y/%m/%d-%H:%M:%S")] Sync sync starts NOW!"
|
echo -e "[$(date +"%Y/%m/%d-%H:%M:%S")] Sync sync starts NOW!"
|
||||||
# sync
|
# sync
|
||||||
/usr/bin/rsync --progress --bwlimit=${SYNC_MAX_BW:-0} -e "ssh -l syncer -p ${SYNC_PORT:-2222} -i /syncer/.ssh/id_syncer -o StrictHostKeyChecking=no" -avh --stats --exclude '*.json' --exclude '.vSphere-HA' $SYNC_PEER:/ /syncer/library --delete || [ $? -eq 23 ] && true
|
/usr/bin/rsync --bwlimit=${SYNC_MAX_BW:-0} -e "ssh -l syncer -p ${SYNC_PORT:-2222} -i /syncer/.ssh/id_syncer -o StrictHostKeyChecking=no" -av --exclude '*.json' $SYNC_PEER:/ /syncer/library
|
||||||
|
|
||||||
# handle removed files / remove directories
|
|
||||||
grep '"files": \[\]' /syncer/library/*/item.json -l | xargs rm -f $1
|
|
||||||
find /syncer/library -type d -empty -delete
|
|
||||||
|
|
||||||
# generate content library manifest
|
# generate content library manifest
|
||||||
echo -e "[$(date +"%Y/%m/%d-%H:%M:%S")] Generating content library manifest..."
|
echo -e "[$(date +"%Y/%m/%d-%H:%M:%S")] Generating content library manifest..."
|
||||||
|
|
Loading…
Reference in a new issue