ports/59436: [NEW PORT] net/nsca: Nagios Service Check Acceptor
Paul Dlug
paul at aps.org
Tue Nov 18 21:30:29 UTC 2003
>Number: 59436
>Category: ports
>Synopsis: [NEW PORT] net/nsca: Nagios Service Check Acceptor
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue Nov 18 13:30:23 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Paul Dlug
>Release: FreeBSD 5.1-RELEASE-p10 i386
>Organization:
>Environment:
System: FreeBSD lugnut.aps.org 5.1-RELEASE-p10 FreeBSD 5.1-RELEASE-p10 #8: Sat Oct 4 17:42:40 EDT
>Description:
The Nagios Service Check Acceptor (NSCA) is used to send service check
results to a central Nagios server. This consists of the "nsca" daemon
which runs on the main Nagios server and accepts results and the
"check_nsca" plugin which is used to send results to the server.
WWW: http://www.nagios.org/
Generated with FreeBSD Port Tools 0.50
>How-To-Repeat:
>Fix:
--- nsca-2.4.shar begins here ---
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# nsca
# nsca/Makefile
# nsca/distinfo
# nsca/pkg-descr
# nsca/pkg-plist
# nsca/pkg-install
#
echo c - nsca
mkdir -p nsca > /dev/null 2>&1
echo x - nsca/Makefile
sed 's/^X//' >nsca/Makefile << 'END-of-nsca/Makefile'
X# New ports collection makefile for: nsca
X# Date created: 18 Nov 2003
X# Whom: Paul Dlug<paul at nerdlabs.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME= nsca
XPORTVERSION= 2.4
XPORTREVISION= 0
XCATEGORIES= net
XMASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR= nagios
X
XMAINTAINER= paul at nerdlabs.com
XCOMMENT= Nagios Service Check Acceptor
X
XRUN_DEPENDS= ${LOCALBASE}/bin/nagios:${PORTSDIR}/net/nagios
X
XCONFIGURE_ARGS= --prefix=${PREFIX} --localstatedir=/var/spool/nagios
XGNU_CONFIGURE= yes
X
Xdo-install:
X ${INSTALL_PROGRAM} ${WRKSRC}/src/nsca ${PREFIX}/libexec/nagios/nsca
X ${INSTALL_PROGRAM} ${WRKSRC}/src/send_nsca ${PREFIX}/libexec/nagios/send_nsca
X ${INSTALL_DATA} ${WRKSRC}/nsca.cfg ${PREFIX}/etc/nagios
X ${INSTALL_DATA} ${WRKSRC}/send_nsca.cfg ${PREFIX}/etc/nagios
X
X.include <bsd.port.mk>
END-of-nsca/Makefile
echo x - nsca/distinfo
sed 's/^X//' >nsca/distinfo << 'END-of-nsca/distinfo'
XMD5 (nsca-2.4.tar.gz) = ab58553a87940f574ec54189a43a70bc
END-of-nsca/distinfo
echo x - nsca/pkg-descr
sed 's/^X//' >nsca/pkg-descr << 'END-of-nsca/pkg-descr'
XThe Nagios Service Check Acceptor (NSCA) is used to send service check
Xresults to a central Nagios server. This consists of the "nsca" daemon
Xwhich runs on the main Nagios server and accepts results and the
X"check_nsca" plugin which is used to send results to the server.
X
X
XWWW: http://www.nagios.org/
END-of-nsca/pkg-descr
echo x - nsca/pkg-plist
sed 's/^X//' >nsca/pkg-plist << 'END-of-nsca/pkg-plist'
Xetc/nagios/nsca.cfg
Xetc/nagios/send_nsca.cfg
Xlibexec/nagios/nsca
Xlibexec/nagios/send_nsca
END-of-nsca/pkg-plist
echo x - nsca/pkg-install
sed 's/^X//' >nsca/pkg-install << 'END-of-nsca/pkg-install'
X#!/bin/sh
X#
X# $FreeBSD: ports/net/nrpe/pkg-install,v 1.1 2003/01/09 22:13:58 edwin Exp $
X#
X
XPKG_PREFIX=${PKG_PREFIX:=/usr/local}
X
Xuser=nagios
Xgroup=nagios
X
Xask() {
X local question default answer
X
X question=$1
X default=$2
X if [ -z "${PACKAGE_BUILDING}" ]; then
X read -p "${question} [${default}]? " answer
X fi
X if [ x${answer} = x ]; then
X answer=${default}
X fi
X echo ${answer}
X}
X
Xyesno() {
X local dflt question answer
X
X question=$1
X dflt=$2
X while :; do
X answer=$(ask "${question}" "${dflt}")
X case "${answer}" in
X [Yy]*) return 0;;
X [Nn]*) return 1;;
X esac
X echo "Please answer yes or no."
X done
X}
X
Xif [ x"$2" = xPRE-INSTALL ]; then
X if /usr/sbin/pw groupshow "${group}" 2>/dev/null; then
X echo "You already have a group \"${group}\", so I will use it."
X else
X echo "You need a group \"${group}\"."
X if yesno "Would you like me to create it" y; then
X /usr/sbin/pw groupadd ${group} -h - || exit
X echo "Done."
X else
X echo "Please create it, and try again."
X exit 1
X fi
X fi
X
X if /usr/sbin/pw user show "${user}" 2>/dev/null; then
X echo "You already have a user \"${user}\", so I will use it."
X else
X echo "You need a user \"${user}\"."
X if yesno "Would you like me to create it" y; then
X /usr/sbin/pw useradd ${user} -g ${group} -h - -d ${PKG_PREFIX}/var/nagios \
X -s /nonexistent -c "Nagios pseudo-user" || exit
X echo "Done."
X else
X echo "Please create it, and try again."
X exit 1
X fi
X fi
X
Xfi
END-of-nsca/pkg-install
exit
--- nsca-2.4.shar ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list