mirror of
https://github.com/octoleo/lsyncd.git
synced 2025-01-06 08:40:44 +00:00
activated moves
This commit is contained in:
parent
2fbf00b5b4
commit
134f570ac4
@ -1,7 +1,7 @@
|
||||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
#AC_PREREQ(2.60)
|
||||
AC_INIT(lsyncd, 2.0beta2, axkibe@gmail.com)
|
||||
AC_INIT(lsyncd, 2.0beta3, axkibe@gmail.com)
|
||||
AC_CONFIG_SRCDIR([lsyncd.c],[lsyncd.lua],[inotify.c])
|
||||
AC_CONFIG_HEADER([config.h],[lsyncd.h])
|
||||
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
|
||||
|
17
lsyncd.lua
17
lsyncd.lua
@ -20,7 +20,7 @@ if lsyncd_version then
|
||||
"You cannot use the lsyncd runner as configuration file!")
|
||||
lsyncd.terminate(-1) -- ERRNO
|
||||
end
|
||||
lsyncd_version = "2.0beta2"
|
||||
lsyncd_version = "2.0beta3"
|
||||
|
||||
-----
|
||||
-- Hides the core interface from user scripts
|
||||
@ -2599,16 +2599,16 @@ local default_rsyncssh = {
|
||||
-- Spawns rsync for a list of events
|
||||
--
|
||||
action = function(inlet)
|
||||
local event = inlet.getEvent()
|
||||
local event, event2 = inlet.getEvent()
|
||||
local config = inlet.getConfig()
|
||||
|
||||
-- makes move local on host
|
||||
if event.etype == 'Move' then
|
||||
log("Normal", "Moving ",event.path," -> ",event.path2)
|
||||
log("Normal", "Moving ",event.path," -> ",event2.path)
|
||||
spawn(event, "/usr/bin/ssh",
|
||||
config.host, "mv",
|
||||
config.targetdir .. event.path,
|
||||
config.targetdir .. event.path2)
|
||||
config.targetdir .. event2.path)
|
||||
return
|
||||
end
|
||||
|
||||
@ -2736,8 +2736,13 @@ local default_rsyncssh = {
|
||||
-----
|
||||
-- allow several processes
|
||||
--
|
||||
maxProcesses = 1,
|
||||
|
||||
maxProcesses = 3,
|
||||
|
||||
------
|
||||
-- Let the core not split move event.
|
||||
--
|
||||
onMove = true,
|
||||
|
||||
-----
|
||||
-- Default delay.
|
||||
--
|
||||
|
@ -28,7 +28,7 @@ posix.sleep(1)
|
||||
churn(srcdir, 100)
|
||||
|
||||
cwriteln("waiting for Lsyncd to finish its jobs.")
|
||||
posix.sleep(20)
|
||||
posix.sleep(30)
|
||||
|
||||
cwriteln("killing the Lsyncd daemon")
|
||||
posix.kill(pid)
|
||||
|
@ -31,7 +31,7 @@ posix.sleep(1)
|
||||
churn(srcdir, 100)
|
||||
|
||||
cwriteln("waiting for Lsyncd to finish its jobs.")
|
||||
posix.sleep(20)
|
||||
posix.sleep(30)
|
||||
|
||||
cwriteln("killing the Lsyncd daemon")
|
||||
posix.kill(pid)
|
||||
|
Loading…
Reference in New Issue
Block a user