From owner-freebsd-ports Thu Jan 9 13:40:15 2003 Delivered-To: freebsd-ports@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4727F37B405 for ; Thu, 9 Jan 2003 13:40:10 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 67CE443EB2 for ; Thu, 9 Jan 2003 13:40:09 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h09Le9NS019894 for ; Thu, 9 Jan 2003 13:40:09 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h09Le9Sb019893; Thu, 9 Jan 2003 13:40:09 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9475E37B401 for ; Thu, 9 Jan 2003 13:39:41 -0800 (PST) Received: from ridge.aps.org (ridge.aps.org [149.28.1.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id A584F43E4A for ; Thu, 9 Jan 2003 13:39:40 -0800 (PST) (envelope-from paul@aps.org) Received: from lugnut.aps.org (lugnut.aps.org [149.28.3.182]) by ridge.aps.org (8.9.3+Sun/8.9.3) with ESMTP id QAA00381 for ; Thu, 9 Jan 2003 16:30:54 -0500 (EST) Received: by lugnut.aps.org (Postfix, from userid 587) id 99C0C201; Thu, 9 Jan 2003 16:30:53 -0500 (EST) Message-Id: <20030109213053.99C0C201@lugnut.aps.org> Date: Thu, 9 Jan 2003 16:30:53 -0500 (EST) From: Paul Dlug Reply-To: Paul Dlug To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/46903: Update nrpe to 1.7 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 46903 >Category: ports >Synopsis: Update nrpe to 1.7 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Thu Jan 09 13:40:03 PST 2003 >Closed-Date: >Last-Modified: >Originator: Paul Dlug >Release: FreeBSD 4.7-STABLE i386 >Organization: >Environment: System: FreeBSD lugnut.aps.org 4.7-STABLE FreeBSD 4.7-STABLE #5: Thu Jan 9 11:43:01 EST 2003 root@lugnut.aps.org:/usr/obj/usr/src/sys/LUGNUT i386 >Description: Update of the nrpe port to version 1.7 (from 1.5) which adds some new options and bug fixes. Added a script to add the necessary user (nagios) to run the daemon under, copied from the nagios port. Also added the installation of the provided startup script for freebsd. >How-To-Repeat: >Fix: --- nrpe.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: # # nrpe # nrpe/Makefile # nrpe/distinfo # nrpe/pkg-comment # nrpe/pkg-descr # nrpe/pkg-plist # nrpe/pkg-install # echo c - nrpe mkdir -p nrpe > /dev/null 2>&1 echo x - nrpe/Makefile sed 's/^X//' >nrpe/Makefile << 'END-of-nrpe/Makefile' X# New ports collection makefile for: nrpe X# Date created: 1 Aug 2002 X# Whom: Paul Dlug X# X# $FreeBSD: ports/net/nrpe/Makefile,v 1.1 2003/01/03 02:49:08 edwin Exp $ X# X XPORTNAME= nrpe XPORTVERSION= 1.7 XPORTREVISION= 0 XCATEGORIES= net XMASTER_SITES= ${MASTER_SITE_SOURCEFORGE} XMASTER_SITE_SUBDIR= nagios X XMAINTAINER= paul@nerdlabs.com X XRUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net/nagios-plugins X XGNU_CONFIGURE= yes X Xpre-install: X @PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL X ${SED} -i bak -e "s=/usr/local/bin/nrpe=/usr/local/sbin/nrpe=" ${WRKSRC}/init-script.freebsd X X Xdo-install: X ${INSTALL_PROGRAM} ${WRKSRC}/src/nrpe ${PREFIX}/sbin/nrpe X ${INSTALL_DATA} ${WRKSRC}/nrpe.cfg ${PREFIX}/etc/nrpe.cfg-sample X ${INSTALL_SCRIPT} ${WRKSRC}/init-script.freebsd ${PREFIX}/etc/rc.d/nrpe.sh X X.include END-of-nrpe/Makefile echo x - nrpe/distinfo sed 's/^X//' >nrpe/distinfo << 'END-of-nrpe/distinfo' XMD5 (nrpe-1.7.tar.gz) = f9462e9446ef1928e27a612ac5f87fdb END-of-nrpe/distinfo echo x - nrpe/pkg-comment sed 's/^X//' >nrpe/pkg-comment << 'END-of-nrpe/pkg-comment' XNagios Remote Plugin Executor END-of-nrpe/pkg-comment echo x - nrpe/pkg-descr sed 's/^X//' >nrpe/pkg-descr << 'END-of-nrpe/pkg-descr' Xnrpe is used to execute Nagios plugins on remote hosts and report the results Xto the main Nagios server. From the Nagios homepage: X XAllows you to execute "local" plugins (like check_disk, check_procs, etc.) on Xremote hosts. The check_nrpe plugin is called from Nagios and actually makes Xthe plugin requests to the remote host. Requires that nrpe be running on the Xremote host (either as a standalone daemon or as a service under inetd). X XWWW: http://www.nagios.org/ END-of-nrpe/pkg-descr echo x - nrpe/pkg-plist sed 's/^X//' >nrpe/pkg-plist << 'END-of-nrpe/pkg-plist' Xsbin/nrpe Xetc/nrpe.cfg-sample Xetc/rc.d/nrpe.sh END-of-nrpe/pkg-plist echo x - nrpe/pkg-install sed 's/^X//' >nrpe/pkg-install << 'END-of-nrpe/pkg-install' X#!/bin/sh X# X# $FreeBSD: ports/net/nagios/pkg-install,v 1.2 2002/05/29 06:35:16 kuriyama 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-nrpe/pkg-install exit --- nrpe.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message