diff options
author | Timo Teräs <timo.teras@iki.fi> | 2015-01-08 11:14:15 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2015-01-08 11:14:57 +0200 |
commit | 4c5a6852d499231f038d466970f5374977c09a7d (patch) | |
tree | 647d49cc310bedf3abc70049578b374b0eb2819b /main/lsyncd/lpostcmd.patch | |
parent | 99fc0aafe050da949421bbf4b61420f0b2b81d7f (diff) | |
download | aports-4c5a6852d499231f038d466970f5374977c09a7d.tar.bz2 aports-4c5a6852d499231f038d466970f5374977c09a7d.tar.xz |
main/lsyncd: fix lpostcmd example script after upgrade
Seems the upstream lpostcmd.lua example is outdated, and needs
few additional fixes again. fixes #3678.
Diffstat (limited to 'main/lsyncd/lpostcmd.patch')
-rw-r--r-- | main/lsyncd/lpostcmd.patch | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/main/lsyncd/lpostcmd.patch b/main/lsyncd/lpostcmd.patch index c5d6944193..3525a066bc 100644 --- a/main/lsyncd/lpostcmd.patch +++ b/main/lsyncd/lpostcmd.patch @@ -1,5 +1,5 @@ ---- a/examples/lpostcmd.lua -+++ b/examples/lpostcmd.lua +--- lsyncd-2.1.5/examples/lpostcmd.lua 2013-06-03 14:48:29.000000000 -0300 ++++ ../lpostcmd.lua 2015-01-08 11:11:52.500886631 -0200 @@ -6,7 +6,7 @@ -- after every successfullycompleted rsync operation. -- for example to restart servlets on the target host or so. @@ -18,7 +18,7 @@ spawn(event, "/usr/bin/ssh", config.host, config.postcmd) return -@@ -58,7 +58,7 @@ +@@ -58,11 +58,11 @@ return default.collect(agent,exitcode) end error("this should never be reached") @@ -27,8 +27,17 @@ -- called before anything else -- builds the target from host and targetdir -@@ -75,13 +75,3 @@ - return default.rsync.prepare(config) +- prepare = function(config) ++ prepare = function(config, level, skipTarget) + if not config.host then + error("rsyncpostcmd neets 'host' configured", 4) + end +@@ -72,16 +72,6 @@ + if not config.target then + config.target = config.host .. ":" .. config.targetdir + end +- return default.rsync.prepare(config) ++ return default.rsync.prepare(config, level, skipTarget) end } - |