diff options
author | mich <mich@FreeBSD.org> | 2003-06-04 09:49:31 +0000 |
---|---|---|
committer | mich <mich@FreeBSD.org> | 2003-06-04 09:49:31 +0000 |
commit | 423219b157c95ab26a2c31db7820e61c25f3c7eb (patch) | |
tree | 4c3b56ff426f7a82f4d7aedff21921a552bc2c07 /net/apinger | |
parent | f5cdddcc8d9df929bb6e27bd978ba0eb718937b2 (diff) | |
download | FreeBSD-ports-423219b157c95ab26a2c31db7820e61c25f3c7eb.zip FreeBSD-ports-423219b157c95ab26a2c31db7820e61c25f3c7eb.tar.gz |
Add startup script for apinger.
Submitted by: rob@debank.tv
Approved by: roberto (mentor)
Diffstat (limited to 'net/apinger')
-rw-r--r-- | net/apinger/Makefile | 12 | ||||
-rw-r--r-- | net/apinger/files/apinger.sh | 19 | ||||
-rw-r--r-- | net/apinger/pkg-plist | 1 |
3 files changed, 31 insertions, 1 deletions
diff --git a/net/apinger/Makefile b/net/apinger/Makefile index a725cc4..1364e8e 100644 --- a/net/apinger/Makefile +++ b/net/apinger/Makefile @@ -8,20 +8,30 @@ PORTNAME= apinger PORTVERSION= 0.6.1 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://www.bnet.pl/~jajcus/apinger/ MAINTAINER= mich@FreeBSD.org COMMENT= An IP device monitoring tool +USE_REINPLACE= yes + GNU_CONFIGURE= yes +post-extract: + @${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" ${FILESDIR}/apinger.sh + post-install: ${INSTALL_DATA} ${WRKSRC}/src/apinger.conf ${PREFIX}/etc/apinger.conf.sample + ${INSTALL_SCRIPT} ${FILESDIR}/apinger.sh \ + ${PREFIX}/etc/rc.d/apinger.sh.sample .if !defined(BATCH) @${ECHO_MSG} "" @${ECHO_MSG} "###############################################################################" - @${ECHO_MSG} "# Please edit ${PREFIX}/etc/apinger.conf to your needs. #" + @${ECHO_MSG} "# Please edit ${PREFIX}/etc/apinger.conf to your needs. #" + @${ECHO_MSG} "# A sample shell script has been installed in ${PREFIX}/etc/rc.d/ #" + @${ECHO_MSG} "# rename it to automatically start apinger at boot. #" @${ECHO_MSG} "###############################################################################" .endif diff --git a/net/apinger/files/apinger.sh b/net/apinger/files/apinger.sh new file mode 100644 index 0000000..723e6bc --- /dev/null +++ b/net/apinger/files/apinger.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +case $1 in +start) + [ -x %%PREFIX%%/sbin/apinger ] && %%PREFIX%%/sbin/apinger && echo -n ' apinger' + ;; +restart) + killall -HUP apinger && echo -n ' apinger' + ;; +stop) + killall apinger && echo -n ' apinger' + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + exit 64 + ;; +esac + +exit 0 diff --git a/net/apinger/pkg-plist b/net/apinger/pkg-plist index 3e9b50e..57e08e4 100644 --- a/net/apinger/pkg-plist +++ b/net/apinger/pkg-plist @@ -1,5 +1,6 @@ sbin/apinger etc/apinger.conf.sample +etc/rc.d/apinger.sh.sample %%PORTDOCS%%share/doc/apinger/README %%PORTDOCS%%share/doc/apinger/NEWS %%PORTDOCS%%share/doc/apinger/AUTHORS |