Add the service-start script graciously

Submitted by:	Johan Hendriks

(Do not know, how it escaped me to make one up myself.)
This commit is contained in:
Mikhail Teterin 2017-11-14 15:07:32 +00:00
parent 291bcf354c
commit 14080b805a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=454178
2 changed files with 31 additions and 0 deletions

View file

@ -3,6 +3,7 @@
PORTNAME= incron
DISTVERSION= 2017-11-13
PORTREVISION= 1
CATEGORIES= sysutils
MAINTAINER= mi@aldan.algebra.com
@ -24,6 +25,7 @@ LDFLAGS+= -L${LOCALBASE}/lib -linotify
MAKE_ARGS= PREFIX="${PREFIX}" USER=${UID} \
DOCDIR="${PREFIX}/etc" \
MANPATH=${MANPREFIX}/man
USE_RC_SUBR= ${PORTNAME}
post-patch:
${REINPLACE_CMD} -e 's,/etc/incron,${PREFIX}/etc/incron,' \

View file

@ -0,0 +1,29 @@
#!/bin/sh
# PROVIDE: incrond
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to
# enable incrond:
#
# incrond_enable (bool): Set to NO by default. Set it to YES to
# enable incrond.
# incrond_config (string): Set to the standard config file path by
# default.
#
. /etc/rc.subr
name="incrond"
rcvar=incrond_enable
load_rc_config $name
: ${incrond_enable:=NO}
: ${incrond_config:=%%PREFIX%%/etc/incron.conf}
command="%%PREFIX%%/sbin/${name}"
required_files="${incrond_config}"
run_rc_command "$1"