Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Aug 2013 11:47:45 GMT
From:      Natacha Porté <natbsd@instinctive.eu>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/181485: [NEW PORT] sysutils/filewatcherd: Daemon that watches files and runs commands when they change
Message-ID:  <201308231147.r7NBljrR037569@oldred.freebsd.org>
Resent-Message-ID: <201308231150.r7NBo2O8043095@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         181485
>Category:       ports
>Synopsis:       [NEW PORT] sysutils/filewatcherd: Daemon that watches files and runs commands when they change
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 23 11:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Natacha Porté
>Release:        9.1-RELEASE
>Organization:
>Environment:
FreeBSD bifrost 9.1-RELEASE-p4 FreeBSD 9.1-RELEASE-p4 #0 r252111M: Sun Jun 23 14:31:39 CEST 2013     root@bifrost:/usr/obj/usr/src-STABLE/9.1/sys/GENERIC  amd64
>Description:
filewatcherd is a daemon inspired by cron, that run commands based on file changes instead of time.

In principle it is similar to incron, but it's simpler, more limited, and does not depend on anything outside of FreeBSD base.

WWW: https://github.com/faelys/filewatcherd

Note: I tried going through redports with it, but something seems broken outside of the port https://redports.org/buildarchive/20130823112101-37091/
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	filewatcherd
#	filewatcherd/files
#	filewatcherd/files/watchtab.sample
#	filewatcherd/files/pkg-message.in
#	filewatcherd/files/filewatcherd.in
#	filewatcherd/distinfo
#	filewatcherd/pkg-descr
#	filewatcherd/Makefile
#
echo c - filewatcherd
mkdir -p filewatcherd > /dev/null 2>&1
echo c - filewatcherd/files
mkdir -p filewatcherd/files > /dev/null 2>&1
echo x - filewatcherd/files/watchtab.sample
sed 's/^X//' >filewatcherd/files/watchtab.sample << '0b74342446c2519a6fa457d853b6cd86'
X/root/wolverine	delete	0.1	touch ${TRIGGER}
0b74342446c2519a6fa457d853b6cd86
echo x - filewatcherd/files/pkg-message.in
sed 's/^X//' >filewatcherd/files/pkg-message.in << '0e20082a8f2b50b2cbb3a7b560e337a1'
X========================================================================
Xfilwatcherd configuration files were installed in the following directory:
X
X	%%ETCDIR%%
X
XBefore starting the server or the client you need to perform the
Xfollowing steps:
X
X1) Copy the appropriate sample configuration file as follows:
X
X	cp %%ETCDIR%%/watchtab.sample %%ETCDIR%%/watchtab
X
X2) Edit filewatcherd's configuration file to suit your needs:
X
X	$EDITOR %%ETCDIR%%/watchtab
X
X3) Add the following line to your rc.conf:
X
X	filewatcherd_enable="YES" 
X
X
XThen you can start filewatcherd by issuing the following command:
X
X	%%PREFIX%%/etc/rc.d/filewatcherd start
X========================================================================
0e20082a8f2b50b2cbb3a7b560e337a1
echo x - filewatcherd/files/filewatcherd.in
sed 's/^X//' >filewatcherd/files/filewatcherd.in << '5b6d682ebc427fdea6b678d83c9677a1'
X#!/bin/sh
X# $FreeBSD$
X#
X# PROVIDE: filewatcherd
X# REQUIRE: DAEMON
X# KEYWORD: shutdown
X#
X# Add the following lines to /etc/rc.conf to enable filewatcherd:
X#
X# filewatcherd_enable (bool):   Set it to "YES" to enable filewatcherd
X#                               Default is "NO".
X# filewatcherd_conf (path):     Set full path to config file.
X#                               Default is "%%PREFIX%%/etc/watchtab".
X
X. /etc/rc.subr
X
Xname=filewatcherd
Xrcvar=filewatcherd_enable
X
Xload_rc_config $name
X
X: ${filewatcherd_enable:=NO}
X: ${filewatcherd_conf="%%PREFIX%%/etc/watchtab"}
X
Xcommand=%%PREFIX%%/sbin/filewatcherd
Xcommand_args="${filewatcherd_conf}"
Xrequired_files=${filewatcherd_conf}
X
Xrun_rc_command "$1"
5b6d682ebc427fdea6b678d83c9677a1
echo x - filewatcherd/distinfo
sed 's/^X//' >filewatcherd/distinfo << '457cd12ec6282f9736671b9899662ac0'
XSHA256 (filewatcherd-1.0-beta1.tar.gz) = 869cfd9c0b5d1a0afd0d1d8485e0ad2e988b881820a608999d342e26c02b64c2
XSIZE (filewatcherd-1.0-beta1.tar.gz) = 12919
457cd12ec6282f9736671b9899662ac0
echo x - filewatcherd/pkg-descr
sed 's/^X//' >filewatcherd/pkg-descr << '93a2bc55bd78c145c0ef692e512eb562'
Xfilewatcherd is a daemon inspired by cron, that run commands based on file changes instead of time.
X
XIn principle it is similar to incron, but it's simpler, more limited, and does not depend on anything outside of FreeBSD base.
X
XWWW: https://github.com/faelys/filewatcherd
93a2bc55bd78c145c0ef692e512eb562
echo x - filewatcherd/Makefile
sed 's/^X//' >filewatcherd/Makefile << '0b82f1fcd098c0db6c6f1e5934cab97a'
X# Created by: Natacha Porte <natbsd@instinctive.eu>
X# $FreeBSD$
X
XPORTNAME=	filewatcherd
XDISTVERSION=	1.0-beta1
XCATEGORIES=	sysutils
X
XUSE_GITHUB=	yes
XGH_ACCOUNT=	faelys
XGH_COMMIT=	a2b8081
X
XMAINTAINER=	natbsd@instinctive.eu
XCOMMENT=	Daemon that watches files and runs commands when they change
X
XLICENSE=	BSD
X
XUSE_RC_SUBR=	filewatcherd
X
XSUB_FILES=	pkg-message
XPLIST_FILES=	sbin/filewatcherd etc/watchtab.sample
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/filewatcherd ${PREFIX}/sbin
X	${INSTALL_DATA} ${FILESDIR}/watchtab.sample ${PREFIX}/etc
X
Xpost-install:
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.mk>
0b82f1fcd098c0db6c6f1e5934cab97a
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308231147.r7NBljrR037569>