diff options
author | William Grzybowski <wg@FreeBSD.org> | 2013-08-23 21:52:39 +0800 |
---|---|---|
committer | William Grzybowski <wg@FreeBSD.org> | 2013-08-23 21:52:39 +0800 |
commit | 1ba450ebbfc4c8b83ad8537e03ced60407d1a71f (patch) | |
tree | a7a6146f1b83e4f13f465e84e7e197bc4c4e843f /sysutils | |
parent | dfabd3501f6cd4ed9e660aec8ebed980f7b796bc (diff) | |
download | freebsd-ports-gnome-1ba450ebbfc4c8b83ad8537e03ced60407d1a71f.tar.gz freebsd-ports-gnome-1ba450ebbfc4c8b83ad8537e03ced60407d1a71f.tar.zst freebsd-ports-gnome-1ba450ebbfc4c8b83ad8537e03ced60407d1a71f.zip |
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>
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/Makefile | 1 | ||||
-rw-r--r-- | sysutils/filewatcherd/Makefile | 31 | ||||
-rw-r--r-- | sysutils/filewatcherd/distinfo | 2 | ||||
-rw-r--r-- | sysutils/filewatcherd/files/filewatcherd.in | 29 | ||||
-rw-r--r-- | sysutils/filewatcherd/files/pkg-message.in | 25 | ||||
-rw-r--r-- | sysutils/filewatcherd/files/watchtab.sample | 1 | ||||
-rw-r--r-- | sysutils/filewatcherd/pkg-descr | 7 |
7 files changed, 96 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index 3424d0236ea7..2b5443366900 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -244,6 +244,7 @@ SUBDIR += fileprune SUBDIR += fileschanged SUBDIR += filetype + SUBDIR += filewatcherd SUBDIR += finfo SUBDIR += flasher SUBDIR += flashrom diff --git a/sysutils/filewatcherd/Makefile b/sysutils/filewatcherd/Makefile new file mode 100644 index 000000000000..0094648ceb02 --- /dev/null +++ b/sysutils/filewatcherd/Makefile @@ -0,0 +1,31 @@ +# Created by: Natacha Porte <natbsd@instinctive.eu> +# $FreeBSD$ + +PORTNAME= filewatcherd +PORTVERSION= 1.0b1 +DISTNAME= ${PORTNAME}-${GH_TAGNAME} +CATEGORIES= sysutils + +MAINTAINER= natbsd@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> diff --git a/sysutils/filewatcherd/distinfo b/sysutils/filewatcherd/distinfo new file mode 100644 index 000000000000..95f144c7daa5 --- /dev/null +++ b/sysutils/filewatcherd/distinfo @@ -0,0 +1,2 @@ +SHA256 (filewatcherd-1.0-beta1.tar.gz) = 869cfd9c0b5d1a0afd0d1d8485e0ad2e988b881820a608999d342e26c02b64c2 +SIZE (filewatcherd-1.0-beta1.tar.gz) = 12919 diff --git a/sysutils/filewatcherd/files/filewatcherd.in b/sysutils/filewatcherd/files/filewatcherd.in new file mode 100644 index 000000000000..4ec09b743851 --- /dev/null +++ b/sysutils/filewatcherd/files/filewatcherd.in @@ -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" diff --git a/sysutils/filewatcherd/files/pkg-message.in b/sysutils/filewatcherd/files/pkg-message.in new file mode 100644 index 000000000000..4be99eb49c69 --- /dev/null +++ b/sysutils/filewatcherd/files/pkg-message.in @@ -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 +======================================================================== diff --git a/sysutils/filewatcherd/files/watchtab.sample b/sysutils/filewatcherd/files/watchtab.sample new file mode 100644 index 000000000000..15211c0cfe4d --- /dev/null +++ b/sysutils/filewatcherd/files/watchtab.sample @@ -0,0 +1 @@ +/root/wolverine delete 0.1 touch ${TRIGGER} diff --git a/sysutils/filewatcherd/pkg-descr b/sysutils/filewatcherd/pkg-descr new file mode 100644 index 000000000000..59730e92ff87 --- /dev/null +++ b/sysutils/filewatcherd/pkg-descr @@ -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/ |