This commit is contained in:
Axel Kittenberger 2010-11-16 12:10:27 +00:00
parent a1a81cab22
commit 24dd888ba7

View File

@ -15,13 +15,18 @@
-- One second after a file is created/modified it checks for its permissions -- One second after a file is created/modified it checks for its permissions
-- and forces group permissions on it. -- and forces group permissions on it.
-- --
-- This is example regards more the handcraft of bash scripting than lsyncd. -- This example regards more the handcraft of bash scripting than lsyncd.
-- An alternative to this would be to load a Lua-Posix library and do the -- An alternative to this would be to load a Lua-Posix library and do the
-- permission changes right within the onAction handlers. -- permission changes right within the onAction handlers.
-- forces this group ----
fgroup = "axel" -- forces this group.
--
fgroup = "staff"
-----
-- script for all changes.
--
command = command =
-- checks if the group is the one enforced and sets them if not -- checks if the group is the one enforced and sets them if not
[[ [[
@ -48,12 +53,12 @@ fi
]] ]]
-- on startup recursevily sets all group ownerships -- on startup recursevily sets all group ownerships
-- all group permission to rw for all -- all group permissions are set to rw
-- and to executable for directories -- and to executable flag for directories
-- --
-- the hash in the first line is important, otherwise due to the starting -- the hash in the first line is important, otherwise due to the starting
-- slash, syncd will think its a call to the binary /bin/chgrp only -- slash, Lsyncd would think it is a call to the binary /bin/chgrp only
-- instead of a bash script. -- and would optimize the bash away.
-- --
startup = startup =
[[# [[#
@ -62,10 +67,6 @@ startup =
/usr/bin/find ^source -type d | xargs chmod g+x /usr/bin/find ^source -type d | xargs chmod g+x
]] ]]
-----
-- for testing purposes. uses bash command to hold local dirs in sync.
--
gforce = { gforce = {
maxProcesses = 99, maxProcesses = 99,
delay = 1, delay = 1,
@ -73,7 +74,7 @@ gforce = {
onAttrib = command, onAttrib = command,
onCreate = command, onCreate = command,
onModify = command, onModify = command,
-- does nothing on moves, they won change permissions. -- does nothing on moves, they won't change permissions
onMove = true, onMove = true,
} }