Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:kamalisfree:nrpe
nrpe
nrpe.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File nrpe.spec of Package nrpe
%define name nrpe %define version 2.12 %define release 1 %define nsusr nagios %define nsgrp nagios %define nsport 5666 # Reserve option to override port setting with: # rpm -ba|--rebuild --define 'nsport 5666' %{?port:%define nsport %{port}} # Macro that print mesages to syslog at package (un)install time %define nnmmsg logger -t %{name}/rpm Summary: This is the daemon part of NRPE. The daemon resides on the monitored systems. URL: http://www.nagios.org Name: %{name} Version: %{version} Release: %{release} License: GPL Group: Application/System Source0: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-buildroot Prefix: %{_prefix} Prefix: /etc/init.d Prefix: /etc/nagios Requires: bash, grep PreReq: /bin/logger, /sbin/chkconfig, sh-utils, shadow-utils, sed, fileutils, mktemp %description The nrpe daemon is a system daemon that will execute various Nagios plugins locally on behalf of a remote (monitoring) host that uses the check_nrpe plugin. Various plugins that can be executed by the daemon are available at: http://sourceforge.net/projects/nagiosplug %prep %setup -q %pre # Create `nagios' group on the system if necessary if grep ^nagios: /etc/group; then : # group already exists else /usr/sbin/groupadd %{nsgrp} || %nnmmsg Unexpected error adding group "%{nsgrp}". Aborting install process. fi # Create `nagios' user on the system if necessary if id %{nsusr} 2> /dev/null ; then : # user already exists else /usr/sbin/useradd -r -d /var/log/nagios -s /bin/sh -c "%{nsusr}" -g %{nsgrp} %{nsusr} || \ %nnmmsg Unexpected error adding user "%{nsusr}". Aborting install process. fi # if LSB standard /etc/init.d does not exist, # create it as a symlink to the first match we find if [ -d /etc/init.d -o -L /etc/init.d ]; then : # we're done elif [ -d /etc/rc.d/init.d ]; then ln -s /etc/rc.d/init.d /etc/init.d elif [ -d /usr/local/etc/rc.d ]; then ln -s /usr/local/etc/rc.d /etc/init.d elif [ -d /sbin/init.d ]; then ln -s /sbin/init.d /etc/init.d fi %post chkconfig nrpe 35 2>/dev/null /etc/init.d/nrpe start %preun if [ "$1" = 0 ]; then /sbin/service nrpe stop > /dev/null 2>&1 /sbin/chkconfig nrpe off 2> /dev/null fi %postun if [ "$1" -ge "1" ]; then /sbin/service nrpe condrestart >/dev/null 2>&1 || : fi %build export PATH=$PATH:/usr/sbin CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \ ./configure \ --with-init-dir=/etc/init.d \ --with-nrpe-port=%{nsport} \ --with-nrpe-user=%{nsusr} \ --with-nrpe-group=%{nsgrp} \ --prefix=%{_prefix} \ --exec-prefix=%{_prefix}/sbin \ --bindir=%{_prefix}/sbin \ --sbindir=%{_prefix}/lib/nagios/cgi \ --libexecdir=%{_prefix}/lib/nagios/plugins \ --datadir=%{_prefix}/share/nagios \ --sysconfdir=/etc/nagios \ --localstatedir=/var/log/nagios \ --enable-command-args \ --enable-ssl make all %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT install -d -m 0755 ${RPM_BUILD_ROOT}/etc/init.d install -d -m 0755 ${RPM_BUILD_ROOT}/etc/nagios install -d -m 0755 ${RPM_BUILD_ROOT}/usr/sbin # install templated configuration files cp sample-config/nrpe.cfg ${RPM_BUILD_ROOT}/etc/nagios/nrpe.cfg cp generic-initscript ${RPM_BUILD_ROOT}/etc/init.d/nrpe cp src/nrpe ${RPM_BUILD_ROOT}/usr/sbin %clean rm -rf $RPM_BUILD_ROOT %files %defattr(755,root,root) /etc/init.d/nrpe %{_prefix}/sbin/nrpe %dir /etc/nagios %defattr(644,root,root) %config(noreplace) /etc/nagios/*.cfg %defattr(755,%{nsusr},%{nsgrp}) %doc Changelog LEGAL README %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor