1ba450ebbf
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>
29 lines
701 B
Bash
29 lines
701 B
Bash
#!/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"
|