From 146408eabd86ada3e55f1024c9c21cac67417a0d Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Apr 26 2017 15:48:45 +0000 Subject: Move to using original nirik nrpe service file for systemd. It worked and the others dont NRPE fails to run using a /var/run/nrpe/ directory so trying to build without it. --- diff --git a/nrpe.service b/nrpe.service index dfa3502..7e8c19c 100644 --- a/nrpe.service +++ b/nrpe.service @@ -1,26 +1,15 @@ [Unit] Description=Nagios Remote Program Executor Documentation=http://www.nagios.org/documentation -After=var-run.mount nss-lookup.target network.target local-fs.target time-sync.target -Before=getty@tty1.service plymouth-quit.service xdm.service Conflicts=nrpe.socket Requires=network.target - [Install] WantedBy=multi-user.target [Service] -Type=simple -Restart=on-abort -PIDFile=/var/run/nrpe/nrpe.pid -RuntimeDirectory=nrpe -RuntimeDirectoryMode=0755 -ExecStart=/usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -f -ExecStopPost=/bin/rm -f /var/run/nrpe/nrpe.pid -ExecReload=/bin/kill -HUP $MAINPID -TimeoutStopSec=60 +Type=forking User=nrpe Group=nrpe -PrivateTmp=true -OOMScoreAdjust=-500 +EnvironmentFile=/etc/sysconfig/nrpe +ExecStart=/usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d $NRPE_SSL_OPT diff --git a/nrpe.spec b/nrpe.spec index a323c14..944e83e 100644 --- a/nrpe.spec +++ b/nrpe.spec @@ -5,7 +5,7 @@ Name: nrpe Version: 3.1.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Host/service/network monitoring agent for Nagios Group: Applications/System @@ -17,6 +17,7 @@ Source2: nrpe-tmpfiles.conf Source3: nrpe.README.SELinux.rst Source4: nrpe.te Source5: nrpe.fc +Source6: nrpe.service #Patch1: nrpe-0001-gitupdates-20170321.patch Patch1: nrpe-0001-nrpe310-format-error.patch Patch3: nrpe-0003-Include-etc-npre.d-config-directory.patch @@ -111,7 +112,7 @@ CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="%{?__global_ldflags}" --libexecdir=%{_libdir}/nagios/plugins \ --datadir=%{_datadir}/nagios \ --sysconfdir=%{_sysconfdir}/nagios \ - --localstatedir=%{_localstatedir}/run/nrpe \ + --localstatedir=%{_localstatedir}/run/ \ --enable-command-args make %{?_smp_mflags} all @@ -131,7 +132,7 @@ rm -rf %{buildroot} %if 0%{?el5}%{?el6} install -D -p -m 0755 startup/default-init %{buildroot}/%{_initrddir}/nrpe %else -install -D -m 0644 -p startup/default-service %{buildroot}%{_unitdir}/%{name}.service +install -D -m 0644 -p %{SOURCE6} %{buildroot}%{_unitdir}/%{name}.service %endif install -D -p -m 0644 sample-config/nrpe.cfg %{buildroot}/%{_sysconfdir}/nagios/%{name}.cfg install -D -p -m 0755 src/nrpe %{buildroot}/%{_sbindir}/nrpe @@ -251,6 +252,10 @@ fi %endif %changelog +* Wed Apr 26 2017 Stephen Smoogen - 3.1.0-2 +- Move to using original nirik nrpe service file for systemd. It worked and the others dont +- NRPE fails to run using a /var/run/nrpe/ directory so trying to build without it. + * Thu Apr 20 2017 Stephen Smoogen - 3.1.0-1 - update to 3.1.0 - put in fix for format-error