Date: Wed, 1 Apr 2009 20:56:18 +1000 (YAKST) From: Alexander Logvinov <ports@logvinov.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: ehaupt@FreeBSD.org Subject: ports/133267: [PATCH] sysutils/watchfolder: provide rc_subr script Message-ID: <200904011056.n31AuI9C020279@blg.akavia.ru> Resent-Message-ID: <200904011100.n31B07Q8010696@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 133267 >Category: ports >Synopsis: [PATCH] sysutils/watchfolder: provide rc_subr script >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Wed Apr 01 11:00:04 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Alexander Logvinov >Release: FreeBSD 6.4-RELEASE i386 >Organization: >Environment: >Description: Provide rc_subr script >How-To-Repeat: >Fix: Index: Makefile =================================================================== RCS file: /home/pcvs/ports/sysutils/watchfolder/Makefile,v retrieving revision 1.6 diff -u -r1.6 Makefile --- Makefile 27 Mar 2009 09:53:34 -0000 1.6 +++ Makefile 1 Apr 2009 10:51:19 -0000 @@ -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 @@ MAKE_JOBS_SAFE= yes WRKSRC= ${WRKDIR}/watchd-${PORTVERSION} +USE_RC_SUBR= watchd post-patch: @${REINPLACE_CMD} -e 's|gcc $$(OPT)|${CC} ${CFLAGS}|' \ Index: files/watchd.in =================================================================== RCS file: files/watchd.in diff -N files/watchd.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/watchd.in 1 Apr 2009 10:51:19 -0000 @@ -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" >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904011056.n31AuI9C020279>