- add RC support

- use USE_DOS2UNIX

PR:		ports/110842
Submitted by:	Brad Huntting <huntting_AT_glarp dot com>
Reviewed by:	clsung
This commit is contained in:
Cheng-Lung Sung 2007-04-02 01:11:38 +00:00
parent 9c705360b8
commit 78bee6fab2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=188969
3 changed files with 49 additions and 20 deletions

View file

@ -7,6 +7,7 @@
PORTNAME= blocksshd
PORTVERSION= 1.0.1
PORTREVISION= 1
CATEGORIES= security sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= blocksshd
@ -21,11 +22,15 @@ RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Net/DNS/Resolver.pm:${PORTSDIR}/dns/p5-Ne
MAKE_ARGS= PREFIX="${PREFIX}" SYSCONFDIR="${PREFIX}/etc"
NO_BUILD= yes
USE_PERL5_RUN= yes
USE_RC_SUBR= blocksshd
USE_DOS2UNIX= blocksshd blocksshd.conf
MAN1= blocksshd.1
post-patch:
post-extract:
@${CHMOD} 755 ${WRKSRC}/init
post-patch:
@${REINPLACE_CMD} -e 's|^MANCOMPRESS = .gz||g' ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e 's|/etc/blocksshd.conf|${PREFIX}/etc/blocksshd.conf|g' ${WRKSRC}/blocksshd

View file

@ -0,0 +1,24 @@
#!/bin/sh
#
# PROVIDE: blocksshd
# REQUIRE: NETWORKING
# BEFORE: securelevel
# KEYWORD: shutdown
. %%RC_SUBR%%
name="blocksshd"
rcvar="`set_rcvar`"
command="%%PREFIX%%/bin/${name}"
command_interpreter="/usr/bin/perl"
pidfile="/var/run/${name}.pid"
blocksshd_flags="--start"
stop_precmd=blocksshd_stop
blocksshd_stop () {
${command} --stop
}
load_rc_config $name
run_rc_command "$1"