- Respect MANPREFIX

- Add rc.d script to easy startup
- Bump PORTREVISION

PR:		92391
Submitted by:	mnag
Approved by:	markp (maintainer timeout, 14 days)
This commit is contained in:
Marcus Alves Grando 2006-02-10 00:52:49 +00:00
parent 300435f077
commit bdbed38002
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=155615
2 changed files with 43 additions and 1 deletions

View file

@ -7,17 +7,20 @@
PORTNAME= redir
PORTVERSION= 2.2.1
PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://sammy.net/~sammy/hacks/
MAINTAINER= markp@FreeBSD.org
COMMENT= A tcp connection redirection utility
USE_RC_SUBR= redir
MAN1= redir.1
PLIST_FILES= bin/redir
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/redir ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/redir.man ${PREFIX}/man/man1/redir.1
${INSTALL_MAN} ${WRKSRC}/redir.man ${MANPREFIX}/man/man1/redir.1
.include <bsd.port.mk>

39
net/redir/files/redir.in Normal file
View file

@ -0,0 +1,39 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: redir
# REQUIRE: DAEMON
# KEYWORD: FreeBSD
#
# Add the following lines to /etc/rc.conf to enable redir:
#
# redir_enable (bool): Set it to "YES" to enable redir.
# Default is "NO".
# redir_flags (flags): Set flags to redir.
# Default id "". see redir(1).
# Example: "--lport=80 --cport=3128 --syslog"
#
. %%RC_SUBR%%
name="redir"
rcvar=`set_rcvar`
load_rc_config $name
: ${redir_enable="NO"}
: ${redir_flags=""}
command=%%PREFIX%%/bin/redir
command_args="${redir_flags} &"
start_precmd="${name}_flags_check"
redir_flags_check()
{
if [ "${redir_flags}" = "" ]; then
err 1 "\$redir_flags are required. see redir(1)"
fi
}
run_rc_command "$1"