1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-29 01:13:08 +00:00

- Replace old style rc script by a RCng one

PR:		ports/119135
Submitted by:	Kay Abendroth <kay.abendroth at raxion.net> (maintainer)
This commit is contained in:
Rong-En Fan 2008-01-03 14:33:11 +00:00
parent df76860b05
commit 282fc4395e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=204916
5 changed files with 40 additions and 26 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= noip
PORTVERSION= 2.1.7
PORTREVISION= 1
CATEGORIES= dns
MASTER_SITES= http://www.no-ip.com/client/linux/ \
http://mirror.inerd.com/FreeBSD/distfiles/${PORTNAME}/
@ -17,9 +18,7 @@ COMMENT= No-IP.com's dynamic DNS update client
ALL_TARGET= noip2
SUB_FILES= pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
post-build:
${SED} "s|%%PREFIX%%|${PREFIX}|g" < ${FILESDIR}/noip.sh > ${WRKSRC}/noip.sh
USE_RC_SUBR= noip
pre-install:
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} \
@ -27,7 +26,6 @@ pre-install:
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/noip2 ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/noip.sh ${PREFIX}/etc/rc.d
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${INSTALL_MAN} ${WRKSRC}/README.FIRST ${DOCSDIR}

32
dns/noip/files/noip.in Normal file
View File

@ -0,0 +1,32 @@
#!/bin/sh
# PROVIDE: noip
# REQUIRE: NETWORKING SYSLOG DAEMON
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# noip_enable (bool): Set to NO by default.
# Set it to YES to enable noip.
# noip_config (path): Set to %%PREFIX%%/etc/no-ip2.conf by default.
# noip_flags: Set to -c %%PREFIX%%/etc/no-ip2.conf by default.
#
. %%RC_SUBR%%
name="noip"
rcvar=`set_rcvar`
command="%%PREFIX%%/bin/${name}"
load_rc_config $name
: ${noip_enable="NO"}
: ${noip_config="%%PREFIX%%/etc/no-ip2.conf"}
: ${noip_flags="-c $noip_config"}
: ${noip_user="noip"}
: ${noip_group="noip"}
required_files=${noip_config}
run_rc_command "$1"

View File

@ -1,19 +0,0 @@
#!/bin/sh
case "$1" in
start)
if [ -x %%PREFIX%%/bin/noip2 -a -f %%PREFIX%%/etc/no-ip2.conf ]; then
echo -n ' noip';
su -m noip -c '%%PREFIX%%/bin/noip2' 2> /dev/null > /dev/null
fi
;;
stop)
echo -n ' noip';
killall noip2
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2
exit 1
;;
esac
exit 0

View File

@ -1,8 +1,12 @@
##################################################################
###########################################################
You need to generate the noip config file 'no-ip2.conf' in
%%PREFIX%%/etc/no-ip2.conf. To do this automatically, run:
make conf
You need to register with www.no-ip.com to use this port.
##################################################################
You also need to add the following line to your
/etc/rc.conf or /etc/rc.conf.local file:
noip_enable="YES"
###########################################################

View File

@ -1,5 +1,4 @@
bin/noip2
etc/rc.d/noip.sh
%%PORTDOCS%%%%DOCSDIR%%/README.FIRST
%%PORTDOCS%%%%DOCSDIR%%/COPYING
%%PORTDOCS%%@dirrm %%DOCSDIR%%