mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-23 04:23:08 +00:00
Provide an rc_subr script
PR: 133267 Submitted by: Alexander Logvinov <ports@logvinov.com>
This commit is contained in:
parent
db3d10336a
commit
44a052accb
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=231446
@ -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}|' \
|
||||
|
29
sysutils/watchfolder/files/watchd.in
Normal file
29
sysutils/watchfolder/files/watchd.in
Normal file
@ -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"
|
Loading…
Reference in New Issue
Block a user