Browse files

Add configfile support for extra rsync args

  • Loading branch information...
1 parent 4ec39d0 commit 3513d234e790ad7ea79c59a8506adccb2aaf4676 @eternicode eternicode committed Mar 21, 2012
Showing with 10 additions and 0 deletions.
  1. +3 −0 README.rst
  2. +4 −0 inosync.py
  3. +3 −0 sample_config.py
View
3 README.rst
@@ -65,6 +65,9 @@ except ``/var/www/localhost`` to 3 remote locations:
"c.mirror.com:" + rpath,
]
+ # extra, raw parameters to rsync
+ #extra = "--rsh=ssh -a"
+
# limit remote sync speed (in KB/s, 0 = no limit)
#rspeed = 0
View
4 inosync.py
@@ -50,6 +50,8 @@ def __init__(self, pretend=False):
def sync(self):
args = [config.rsync, "-ltrp", "--delete"]
+ if config.extra:
+ args.append(config.extra)
args.append("--bwlimit=%s" % config.rspeed)
if config.logfile:
args.append("--log-file=%s" % config.logfile)
@@ -143,6 +145,8 @@ def load_config(filename):
if not "logfile" in dir(config):
config.logfile = None
+ if not "extra" in dir(config):
+ config.extra = ""
if not "rsync" in dir(config):
config.rsync = "/usr/bin/rsync"
if not os.path.isabs(config.rsync):
View
3 sample_config.py
@@ -16,6 +16,9 @@
"c.mirror.com:" + rpath,
]
+# extra, raw parameters to rsync
+#extra = "--rsh=ssh -a"
+
# limit remote sync speed (in KB/s, 0 = no limit)
#rspeed = 0

0 comments on commit 3513d23

Please sign in to comment.