aboutsummaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2009-04-01 17:47:22 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2009-04-01 17:47:22 +0000
commit44a052accb95ef2e26b882b1264441796222f1c6 (patch)
treeb3dee133afc6fbf83402cb3ff9236dd8de1acb28 /sysutils
parentdb3d10336a900aac3e56c788e9d7b8a58695d12a (diff)
downloadports-44a052accb95ef2e26b882b1264441796222f1c6.tar.gz
ports-44a052accb95ef2e26b882b1264441796222f1c6.zip
Notes
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/watchfolder/Makefile2
-rw-r--r--sysutils/watchfolder/files/watchd.in29
2 files changed, 31 insertions, 0 deletions
diff --git a/sysutils/watchfolder/Makefile b/sysutils/watchfolder/Makefile
index ca4659a9d292..71e4f7df4a90 100644
--- a/sysutils/watchfolder/Makefile
+++ b/sysutils/watchfolder/Makefile
@@ -7,6 +7,7 @@
PORTNAME= watchfolder
PORTVERSION= 0.3.3
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://dstunrea.sdf-eu.org/files/ \
CRITICAL
@@ -17,6 +18,7 @@ COMMENT= Watch folders for new files and process them
MAKE_JOBS_SAFE= yes
WRKSRC= ${WRKDIR}/watchd-${PORTVERSION}
+USE_RC_SUBR= watchd
post-patch:
@${REINPLACE_CMD} -e 's|gcc $$(OPT)|${CC} ${CFLAGS}|' \
diff --git a/sysutils/watchfolder/files/watchd.in b/sysutils/watchfolder/files/watchd.in
new file mode 100644
index 000000000000..b8c0156d44d7
--- /dev/null
+++ b/sysutils/watchfolder/files/watchd.in
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: watchd
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following line to /etc/rc.conf[.local] to enable watchd
+#
+# watchd_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable watchd.
+
+. %%RC_SUBR%%
+
+name="watchd"
+rcvar=${name}_enable
+
+load_rc_config $name
+
+: ${watchd_enable="NO"}
+: ${watchd_config="%%PREFIX%%/etc/watchd.conf"}
+: ${watchd_log="/var/log/watchd.log"}
+
+command="%%PREFIX%%/bin/watchd"
+command_args="${watchd_config} >> ${watchd_log}"
+required_files="${watchd_config}"
+
+run_rc_command "$1"