svn commit: r325267 - in head/sysutils: . filewatcherd filewatcherd/files

William Grzybowski wg at FreeBSD.org
Fri Aug 23 13:52:41 UTC 2013


Author: wg
Date: Fri Aug 23 13:52:39 2013
New Revision: 325267
URL: http://svnweb.freebsd.org/changeset/ports/325267

Log:
  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/
  
  PR:		ports/181485
  Submitted by:	Natacha Porté <natbsd instinctive.eu>

Added:
  head/sysutils/filewatcherd/
  head/sysutils/filewatcherd/Makefile   (contents, props changed)
  head/sysutils/filewatcherd/distinfo   (contents, props changed)
  head/sysutils/filewatcherd/files/
  head/sysutils/filewatcherd/files/filewatcherd.in   (contents, props changed)
  head/sysutils/filewatcherd/files/pkg-message.in   (contents, props changed)
  head/sysutils/filewatcherd/files/watchtab.sample   (contents, props changed)
  head/sysutils/filewatcherd/pkg-descr   (contents, props changed)
Modified:
  head/sysutils/Makefile

Modified: head/sysutils/Makefile
==============================================================================
--- head/sysutils/Makefile	Fri Aug 23 13:52:23 2013	(r325266)
+++ head/sysutils/Makefile	Fri Aug 23 13:52:39 2013	(r325267)
@@ -244,6 +244,7 @@
     SUBDIR += fileprune
     SUBDIR += fileschanged
     SUBDIR += filetype
+    SUBDIR += filewatcherd
     SUBDIR += finfo
     SUBDIR += flasher
     SUBDIR += flashrom

Added: head/sysutils/filewatcherd/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/filewatcherd/Makefile	Fri Aug 23 13:52:39 2013	(r325267)
@@ -0,0 +1,31 @@
+# Created by: Natacha Porte <natbsd at instinctive.eu>
+# $FreeBSD$
+
+PORTNAME=	filewatcherd
+PORTVERSION=	1.0b1
+DISTNAME=	${PORTNAME}-${GH_TAGNAME}
+CATEGORIES=	sysutils
+
+MAINTAINER=	natbsd at instinctive.eu
+COMMENT=	Daemon that watches files and runs commands when they change
+
+LICENSE=	BSD
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	faelys
+GH_COMMIT=	a2b8081
+GH_TAGNAME=	1.0-beta1
+
+USE_RC_SUBR=	filewatcherd
+
+SUB_FILES=	pkg-message
+PLIST_FILES=	sbin/filewatcherd etc/watchtab.sample
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/filewatcherd ${PREFIX}/sbin
+	${INSTALL_DATA} ${FILESDIR}/watchtab.sample ${PREFIX}/etc
+
+post-install:
+	@${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>

Added: head/sysutils/filewatcherd/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/filewatcherd/distinfo	Fri Aug 23 13:52:39 2013	(r325267)
@@ -0,0 +1,2 @@
+SHA256 (filewatcherd-1.0-beta1.tar.gz) = 869cfd9c0b5d1a0afd0d1d8485e0ad2e988b881820a608999d342e26c02b64c2
+SIZE (filewatcherd-1.0-beta1.tar.gz) = 12919

Added: head/sysutils/filewatcherd/files/filewatcherd.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/filewatcherd/files/filewatcherd.in	Fri Aug 23 13:52:39 2013	(r325267)
@@ -0,0 +1,29 @@
+#!/bin/sh
+# $FreeBSD$
+#
+# PROVIDE: filewatcherd
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable filewatcherd:
+#
+# filewatcherd_enable (bool):   Set it to "YES" to enable filewatcherd
+#                               Default is "NO".
+# filewatcherd_conf (path):     Set full path to config file.
+#                               Default is "%%PREFIX%%/etc/watchtab".
+
+. /etc/rc.subr
+
+name=filewatcherd
+rcvar=filewatcherd_enable
+
+load_rc_config $name
+
+: ${filewatcherd_enable:=NO}
+: ${filewatcherd_conf="%%PREFIX%%/etc/watchtab"}
+
+command=%%PREFIX%%/sbin/filewatcherd
+command_args="${filewatcherd_conf}"
+required_files=${filewatcherd_conf}
+
+run_rc_command "$1"

Added: head/sysutils/filewatcherd/files/pkg-message.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/filewatcherd/files/pkg-message.in	Fri Aug 23 13:52:39 2013	(r325267)
@@ -0,0 +1,25 @@
+========================================================================
+filwatcherd configuration files were installed in the following directory:
+
+	%%ETCDIR%%
+
+Before starting the server or the client you need to perform the
+following steps:
+
+1) Copy the appropriate sample configuration file as follows:
+
+	cp %%ETCDIR%%/watchtab.sample %%ETCDIR%%/watchtab
+
+2) Edit filewatcherd's configuration file to suit your needs:
+
+	$EDITOR %%ETCDIR%%/watchtab
+
+3) Add the following line to your rc.conf:
+
+	filewatcherd_enable="YES"
+
+
+Then you can start filewatcherd by issuing the following command:
+
+	%%PREFIX%%/etc/rc.d/filewatcherd start
+========================================================================

Added: head/sysutils/filewatcherd/files/watchtab.sample
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/filewatcherd/files/watchtab.sample	Fri Aug 23 13:52:39 2013	(r325267)
@@ -0,0 +1 @@
+/root/wolverine	delete	0.1	touch ${TRIGGER}

Added: head/sysutils/filewatcherd/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/filewatcherd/pkg-descr	Fri Aug 23 13:52:39 2013	(r325267)
@@ -0,0 +1,7 @@
+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/


More information about the svn-ports-all mailing list