#
# TARGET         The target directory that'll be monitored
# WATCHES        What should be monitored (ACCESS, MODIFY, ATTRIB, CLOSE_WRITE, CLOSE_NOWRITE,
#                OPEN, MOVED_FROM, MOVED_TO, CREATE, DELETE, DELETE_SELF and/or MOVE_SELF)
# SPAWN          Program that'll be spawn having the new item in question as argument
# LOOKAT         What will be looked at inside the target directory (FILES, DIRS)
# ACCEPT_REGEX   Regex that shall be matched on the new item
#
# NOTE: The parser expects the entries to be ordered (TARGET, WATCHES, SPAWN, LOOKAT
# and then ACCEPT_REGEX).
#

#
# Removes broken links upon removal of a program in /Programs.
#
{
	TARGET        = /root/recurs
	WATCHES       = OPEN, MOVED_FROM, MOVED_TO, CREATE, DELETE, DELETE_SELF, MOVE_SELF
	SPAWN	      = echo $ENTRY >> /var/log/listener
#	SPAWN         = find /System/Links | RemoveBroken >> /var/log/Listener-RemoveBroken.log
	LOOKAT        = FILES
	ACCEPT_REGEX  = ^[-+_[:alnum:]]+
	RECURSIVE     = yes
}

#
#  Simple example to handle automatic installation of packages when dropped in /Programs
#
#{
#	TARGET        = /Programs
#	WATCHES       = CLOSE_WRITE|MOVED_TO
#	SPAWN         = xterm -e InstallPackage --batch --same keep --old keep $ENTRY; mv $ENTRY /Files/Packages
#	LOOKAT        = FILES
#	ACCEPT_REGEX  = ^[-+_[:alnum:]]+--[-.+_[:alnum:]]+--(i386|i686|ppc|arm920t)\.tar\.bz2$
#}
