patrickpeng2091 / lsyncd

Automatically exported from code.google.com/p/lsyncd
GNU General Public License v2.0
0 stars 0 forks source link

Request pre and post rsync shell script #64

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
i hope to have a position to place my own shell script coding for pre and post 
of Rsync. I read a old posting -- 
http://groups.google.com/group/lsyncd/browse_thread/thread/35670b712dc8d37e/a690
469e67d3b4bb?lnk=gst&q=pre+and+post+rsync#a690469e67d3b4bb. 
It seems i need to study the example coding and place into my config file. I 
will have a tried in this, but it is not a very good solution for not a 
programmer of lsyncd. 

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by chungyan5@gmail.com on 27 May 2011 at 7:44

GoogleCodeExporter commented 9 years ago
hi

i Followed the trunk/examples/lpostcmd.lua and get the hint, thanks

Original comment by chungyan5@gmail.com on 8 Jun 2011 at 2:51

GoogleCodeExporter commented 9 years ago
The major problem I see with adding this as simple hooks is I don't know how it 
should handle error, cause it makes a whole matrix of what can fail, 
pre-command, the command itself, post-command. 

I think the simpelest thing is to make a little shell script, that is called by 
Lsyncd to make pre and post commands. Just take care not to slurp stdin, since 
Lsyncd uses this to give rsync filter lists.

Original comment by axk...@gmail.com on 11 Jun 2011 at 2:25