# HG changeset patch # User Eric Joseph-Alexandre # Date 1296605871 -3600 # Node ID f898e6080f920b9bb0f5af623666140030083f5f # Parent b4044080e3a438dbe475bf8c8636e1ee4afd1240 Add: nagios-nrpe diff -r b4044080e3a4 -r f898e6080f92 nagios-nrpe/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios-nrpe/receipt Wed Feb 02 01:17:51 2011 +0100 @@ -0,0 +1,78 @@ +# SliTaz package receipt. + +PACKAGE="nagios-nrpe" +VERSION="2.12" +CATEGORY="network" +SHORT_DESC="Service and network monitoring program, remote monitoring." +MAINTAINER="erjo@slitaz.org" +SOURCE="nrpe" +TARBALL="$SOURCE-$VERSION.tar.gz" +WEB_SITE="http://www.nagios.org/" +WGET_URL="$SF_MIRROR/nagios/$TARBALL" +BUILD_DEPENDS="libcrypto-dev openssl-dev libwrap-dev" +DEPENDS="nagios-plugins libssl libcrypto" + +# Rules to configure and make the package. +compile_rules() +{ + cd $src + while read patch_file; do + if [ ! -f done.$patch_file ]; then + patch -p1 < ../stuff/$patch_file || exit 1 + touch done.$patch_file + fi + done <> $1/etc/nagios/nagios.cfg +} + +post_remove() +{ + [ -f $1/etc/nagios/nagios.cfg ] && sed -i 's/.*nrpe.cfg//' $1/etc/nagios/nagios.cfg +} diff -r b4044080e3a4 -r f898e6080f92 nagios-nrpe/stuff/nagios-nrpe-2.12-Makefile.u --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios-nrpe/stuff/nagios-nrpe-2.12-Makefile.u Wed Feb 02 01:17:51 2011 +0100 @@ -0,0 +1,26 @@ +--- nrpe-2.12-ori/Makefile.in Wed Mar 14 16:30:05 2007 ++++ nrpe-2.12/Makefile.in Tue Jun 8 21:04:32 2010 +@@ -20,8 +20,8 @@ + SBINDIR=@sbindir@ + LIBEXECDIR=@libexecdir@ + INSTALL=@INSTALL@ +-NAGIOS_INSTALL_OPTS=@NAGIOS_INSTALL_OPTS@ +-NRPE_INSTALL_OPTS=@NRPE_INSTALL_OPTS@ ++NAGIOS_INSTALL_OPTS= ++NRPE_INSTALL_OPTS= + + INIT_DIR=@init_dir@ + INIT_OPTS=-o root -g root +--- nrpe-2.12-ori/src/Makefile.in Mon Aug 13 19:10:07 2007 ++++ nrpe-2.12/src/Makefile.in Tue Jun 8 21:16:02 2010 +@@ -24,8 +24,8 @@ + SBINDIR=@sbindir@ + LIBEXECDIR=@libexecdir@ + INSTALL=@INSTALL@ +-NAGIOS_INSTALL_OPTS=@NAGIOS_INSTALL_OPTS@ +-NRPE_INSTALL_OPTS=@NRPE_INSTALL_OPTS@ ++NAGIOS_INSTALL_OPTS= ++NRPE_INSTALL_OPTS= + + # Generated automatically from configure script + SNPRINTF_O=@SNPRINTF_O@ diff -r b4044080e3a4 -r f898e6080f92 nagios-nrpe/stuff/nrpe --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios-nrpe/stuff/nrpe Wed Feb 02 01:17:51 2011 +0100 @@ -0,0 +1,56 @@ +#!/bin/sh +# /etc/init.d/nrpe : Start, stop and restart NRPE Server on SliTaz, at +# boot time or with the command line. +# +# To start SSH server at boot time, just put nagios in the $RUN_DAEMONS +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf +# +. /etc/init.d/rc.functions +. /etc/daemons.conf + +NAME=NRPE +DESC="NRPE daemon" +DAEMON=/usr/bin/nrpe +CONFIG_FILE="/etc/nagios/nrpe.cfg" +OPTIONS="-n -c $CONFIG_FILE -d" +PIDFILE=/var/run/nagios/nrpe.pid + +case "$1" in + start) + if active_pidfile $PIDFILE nrpe ; then + echo "$NAME already running." + exit 1 + fi + echo -n "Starting $DESC: $NAME... " + $DAEMON $OPTIONS + status + ;; + stop) + if ! active_pidfile $PIDFILE nrpe ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Stopping $DESC: $NAME... " + kill `cat $PIDFILE` + status + ;; + restart|reload) + if ! active_pidfile $PIDFILE nrpe ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Restarting $DESC: $NAME... " + kill `cat $PIDFILE` + sleep 2 + $DAEMON $OPTIONS + status + ;; + *) + echo "" + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart|reload]" + echo "" + exit 1 + ;; +esac + +exit 0 diff -r b4044080e3a4 -r f898e6080f92 nagios-nrpe/stuff/nrpe.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios-nrpe/stuff/nrpe.cfg Wed Feb 02 01:17:51 2011 +0100 @@ -0,0 +1,7 @@ +####################################" +# NRPE Config +####################################" +define command{ + command_name check_nrpe + command_line $USER1$/check_nrpe -n -H $HOSTADDRESS$ -c $ARG1$ +}