- USE_RC_SUBR != yes
PR: ports/136850 Approved by: maintainer Submitted by: myself (pgollucci@)
This commit is contained in:
parent
51759b4ef5
commit
f6a05ad4e0
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=238208
3 changed files with 40 additions and 10 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= swatch
|
||||
PORTVERSION= 3.2.1
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= security sysutils
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= swatch
|
||||
|
@ -23,19 +23,12 @@ RUN_DEPENDS= ${BUILD_DEPENDS}
|
|||
|
||||
PERL_CONFIGURE= yes
|
||||
CONFIGURE_ARGS= INSTALLMAN1DIR=${PREFIX}/man/man1
|
||||
USE_RC_SUBR= yes
|
||||
USE_RC_SUBR= ${PORTNAME}
|
||||
|
||||
MAN1= swatch.1
|
||||
MAN3= Swatch::Actions.3 Swatch::Throttle.3 Swatch::Threshold.3
|
||||
|
||||
RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
|
||||
|
||||
post-patch:
|
||||
${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
|
||||
${FILESDIR}/swatch.sh > ${WRKSRC}/swatch.sh
|
||||
${FIND} ${WRKSRC} -name "*.orig" -delete
|
||||
|
||||
post-install:
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/swatch.sh ${PREFIX}/etc/rc.d
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -36,3 +36,41 @@ if [ -n "${swatch_rules}" ]; then
|
|||
run_rc_command "$1"
|
||||
done
|
||||
fi
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: swatch
|
||||
# REQUIRE: DAEMON
|
||||
#
|
||||
# To enable multiple instance of swatch, add lines like below to
|
||||
# /etc/rc.conf.
|
||||
#
|
||||
# swatch_enable="YES"
|
||||
# swatch_rules="1 2 3"
|
||||
# swatch_1_flags="--config-file=/rc --tail-file=/log --daemon --pid-file=/pid"
|
||||
# swatch_1_user="nobody"
|
||||
# swatch_1_chdir="/var/tmp"
|
||||
# swatch_1_pidfile="/pid"
|
||||
# swatch_2_flags="blah, blah"
|
||||
# swatch_3_flags="blah, blah"
|
||||
|
||||
. %%RC_SUBR%%
|
||||
|
||||
name=swatch
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
command=%%PREFIX%%/bin/swatch
|
||||
procname=%%PREFIX%%/bin/perl
|
||||
|
||||
load_rc_config ${name}
|
||||
|
||||
if [ -n "${swatch_rules}" ]; then
|
||||
for i in ${swatch_rules}; do
|
||||
eval swatch_flags=\$swatch_${i}_flags
|
||||
eval swatch_user=\$swatch_${i}_user
|
||||
eval swatch_chdir=\$swatch_${i}_chdir
|
||||
eval pidfile=\$swatch_${i}_pidfile
|
||||
run_rc_command "$1"
|
||||
done
|
||||
fi
|
|
@ -1,5 +1,4 @@
|
|||
bin/swatch
|
||||
etc/rc.d/swatch.sh
|
||||
%%SITE_PERL%%/Swatch/Actions.pm
|
||||
%%SITE_PERL%%/Swatch/Threshold.pm
|
||||
%%SITE_PERL%%/Swatch/Throttle.pm
|
||||
|
|
Loading…
Reference in a new issue