diff options
author | Rong-En Fan <rafan@FreeBSD.org> | 2008-01-03 14:33:11 +0000 |
---|---|---|
committer | Rong-En Fan <rafan@FreeBSD.org> | 2008-01-03 14:33:11 +0000 |
commit | 282fc4395ef4b249786f3fb79e09b4485ae224bf (patch) | |
tree | 199babd13478be611afdc5f1500b0e0d8c4eb4ac /dns | |
parent | - linux-flashplugin -- multiple vulnerabilities (diff) |
- Replace old style rc script by a RCng one
PR: ports/119135
Submitted by: Kay Abendroth <kay.abendroth at raxion.net> (maintainer)
Notes
Notes:
svn path=/head/; revision=204916
Diffstat (limited to 'dns')
-rw-r--r-- | dns/noip/Makefile | 6 | ||||
-rw-r--r-- | dns/noip/files/noip.in | 32 | ||||
-rw-r--r-- | dns/noip/files/noip.sh | 19 | ||||
-rw-r--r-- | dns/noip/files/pkg-message.in | 8 | ||||
-rw-r--r-- | dns/noip/pkg-plist | 1 |
5 files changed, 40 insertions, 26 deletions
diff --git a/dns/noip/Makefile b/dns/noip/Makefile index 6289a1e72573..724a57c3f9d5 100644 --- a/dns/noip/Makefile +++ b/dns/noip/Makefile @@ -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} diff --git a/dns/noip/files/noip.in b/dns/noip/files/noip.in new file mode 100644 index 000000000000..6b5edc96c9be --- /dev/null +++ b/dns/noip/files/noip.in @@ -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" diff --git a/dns/noip/files/noip.sh b/dns/noip/files/noip.sh deleted file mode 100644 index 285a62718385..000000000000 --- a/dns/noip/files/noip.sh +++ /dev/null @@ -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 diff --git a/dns/noip/files/pkg-message.in b/dns/noip/files/pkg-message.in index 294ab4ce52ab..383e6f53484b 100644 --- a/dns/noip/files/pkg-message.in +++ b/dns/noip/files/pkg-message.in @@ -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" +########################################################### diff --git a/dns/noip/pkg-plist b/dns/noip/pkg-plist index e335c7d00351..df5779ee6c00 100644 --- a/dns/noip/pkg-plist +++ b/dns/noip/pkg-plist @@ -1,5 +1,4 @@ bin/noip2 -etc/rc.d/noip.sh %%PORTDOCS%%%%DOCSDIR%%/README.FIRST %%PORTDOCS%%%%DOCSDIR%%/COPYING %%PORTDOCS%%@dirrm %%DOCSDIR%% |