aboutsummaryrefslogtreecommitdiffstats
path: root/main/lsyncd/lpostcmd.patch
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2014-09-09 17:41:58 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2014-09-09 17:42:22 +0000
commita5b8e233b6a0c7de7ab544e741192422b46816bb (patch)
tree2465a509442ed1a7b51719430f5af6c275a0c822 /main/lsyncd/lpostcmd.patch
parent3be0f608fd170e39f6a506fc9975f1e080adf5f2 (diff)
downloadaports-a5b8e233b6a0c7de7ab544e741192422b46816bb.tar.bz2
aports-a5b8e233b6a0c7de7ab544e741192422b46816bb.tar.xz
main/lsyncd: fix lpostcmd
Diffstat (limited to 'main/lsyncd/lpostcmd.patch')
-rw-r--r--main/lsyncd/lpostcmd.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/main/lsyncd/lpostcmd.patch b/main/lsyncd/lpostcmd.patch
new file mode 100644
index 0000000000..46ca7b9785
--- /dev/null
+++ b/main/lsyncd/lpostcmd.patch
@@ -0,0 +1,44 @@
+--- a/examples/lpostcmd.lua
++++ b/examples/lpostcmd.lua
+@@ -6,7 +6,7 @@
+ -- after every successfullycompleted rsync operation.
+ -- for example to restart servlets on the target host or so.
+
+-local rsyncpostcmd = {
++rsyncpostcmd = {
+
+ -- based on default rsync.
+ default.rsync,
+@@ -25,7 +25,7 @@
+ -- uses rawget to test if "isPostcmd" has been set without
+ -- triggering an error if not.
+ local isPostcmd = rawget(event, "isPostcmd")
+- if event.isPostcmd then
++ if isPostcmd then
+ spawn(event, "/usr/bin/ssh",
+ config.host, config.postcmd)
+ return
+@@ -58,7 +58,7 @@
+ return default.collect(agent,exitcode)
+ end
+ error("this should never be reached")
+- end
++ end,
+
+ -- called before anything else
+ -- builds the target from host and targetdir
+@@ -74,14 +74,5 @@
+ end
+ return default.rsync.prepare(config)
+ end
+-}
+-
+-
+-sync {
+- rsyncpostcmd,
+- source = "src",
+- host = "beetle",
+- targetdir = "/path/to/trg",
+- postcmd = "/usr/local/bin/restart-servelt.sh",
+ }
+