From 14080b805a5d077ba169f20f35e1b696dc9edaa5 Mon Sep 17 00:00:00 2001 From: Mikhail Teterin Date: Tue, 14 Nov 2017 15:07:32 +0000 Subject: [PATCH] Add the service-start script graciously Submitted by: Johan Hendriks (Do not know, how it escaped me to make one up myself.) --- sysutils/incron/Makefile | 2 ++ sysutils/incron/files/incron.in | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 sysutils/incron/files/incron.in diff --git a/sysutils/incron/Makefile b/sysutils/incron/Makefile index 1e784538cfd1..88112fc26316 100644 --- a/sysutils/incron/Makefile +++ b/sysutils/incron/Makefile @@ -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,' \ diff --git a/sysutils/incron/files/incron.in b/sysutils/incron/files/incron.in new file mode 100644 index 000000000000..627f3f85c191 --- /dev/null +++ b/sysutils/incron/files/incron.in @@ -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"