#!/bin/bash
#                      /usr/local/bin/synchronize.sh
# http://crystalfaeries.net/posix/bin/synchronize.sh
# celeste:crystalfaery 2015-02-16 13:34:47+00:00
#
# The /usr/local/bin/synchronize/ directory is executed via "run parts":
# nice ionice -c 3 run-parts --report /usr/local/bin/synchronize > /var/log/syncup.log 2>&1
# 
# Our policy is to place in it only symlinks pointing to "../syncTHING" to invoke syncTHING that lives here
# 
# The parts are executed alphabetically from sync000 through synczzz,
# which timestamp the logfile, and is the place we would put
# invocations of pre- and post- synch tasks.
# 
# Start with just sync000 and synczzz and when that works,
# create one at a time new symlinks to actual scripts in /usr/local/bin,
# and debug them before adding others.
# Most of these are perhaps educational examples,
# however they are so customized and unique to a specific use case,
# that they are unlikely useful "as is".
# 
# We have begun adding for debugging purposes, definitions of option "--dry-run" in scripts which rsync.
# Is the argument passed to the individual scripts when invoked by run-parts? We must test this...

# nice ionice -c 3 run-parts --report /usr/local/bin/synchronize		>> /var/log/syncup.log 2>&1
nice   run-parts --report /usr/local/bin/synchronize -a --dry-run	>> /var/log/syncup.log 2>&1


syntax highlighted by Code2HTML, v. 0.9.1