From a3278b40bb18c87a609cda52bda6eb6c45ed8cd4 Mon Sep 17 00:00:00 2001 From: Automatic Build System Date: Sat, 6 Jan 2024 07:31:42 +0100 Subject: [PATCH] automatic version update by autodist [release 7-1mamba;Sat Mar 02 2013] --- README.md | 2 + nagios-plugins-uptime.nrpe_cfg | 2 + nagios-plugins-uptime.spec | 79 ++++++++++++++++++++++++++++++++++ 3 files changed, 83 insertions(+) create mode 100644 nagios-plugins-uptime.nrpe_cfg create mode 100644 nagios-plugins-uptime.spec diff --git a/README.md b/README.md index d43cc70..3889297 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # nagios-plugins-uptime +This nagios plugins checks the time the server is running. + diff --git a/nagios-plugins-uptime.nrpe_cfg b/nagios-plugins-uptime.nrpe_cfg new file mode 100644 index 0000000..d433f02 --- /dev/null +++ b/nagios-plugins-uptime.nrpe_cfg @@ -0,0 +1,2 @@ +command[check_uptime]=@LIBEXECDIR@/check_uptime +command[check_uptime_and_boot]=@LIBEXECDIR@/check_uptime --critical 30: diff --git a/nagios-plugins-uptime.spec b/nagios-plugins-uptime.spec new file mode 100644 index 0000000..2383adb --- /dev/null +++ b/nagios-plugins-uptime.spec @@ -0,0 +1,79 @@ +Name: nagios-plugins-uptime +Version: 7 +Release: 1mamba +Summary: Check the time the server is running +Group: Network/Monitoring +Vendor: openmamba +Distribution: openmamba +Packager: Davide Madrisan +URL: https://github.com/madrisan/nagios-plugins-uptime +Source0: https://sites.google.com/site/davidemadrisan/files/nagios-plugins-uptime-%{version}.tar.gz +Source1: nagios-plugins-uptime.nrpe_cfg +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +## AUTOBUILDREQ-END +Requires: nagios-nrpe +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +This nagios plugins checks the time the server is running. + +%debug_package + +%prep +%setup -q + +%build +%configure --libexecdir=%{_libdir}/nagios/plugins +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +install -d %{buildroot}%{_sysconfdir}/nrpe.d +cat %{S:1} | sed "s,@LIBEXECDIR@,%{_libdir}/nagios/plugins," \ + > %{buildroot}%{_sysconfdir}/nrpe.d/check_uptime.cfg + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%pre +if [ $1 -ge 1 ]; then +# install/upgrade + grep -q "^include_dir=/etc/nrpe.d" /etc/nagios/nrpe.cfg || + { sed "s,#include_dir=,include_dir=/etc/nrpe.d," /etc/nagios/nrpe.cfg \ + >> /etc/nagios/nrpe.cfg.tmp + mv /etc/nagios/nrpe.cfg.tmp /etc/nagios/nrpe.cfg; } +fi +exit 0 + +%post +[ -f /var/lock/subsys/nrpe ] && /sbin/service nrpe reload &>/dev/null +exit 0 + +%files +%defattr(-,root,root) +%{_libdir}/nagios/plugins/check_uptime +%config(noreplace) %{_sysconfdir}/nrpe.d/check_uptime.cfg +%doc AUTHORS COPYING README + +%changelog +* Sat Mar 02 2013 Automatic Build System 7-1mamba +- automatic version update by autodist + +* Sun Feb 03 2013 Davide Madrisan 6-1mamba +- update to 6 + +* Sat Jan 12 2013 Davide Madrisan 5-1mamba +- update to 5 + +* Wed Jan 02 2013 Davide Madrisan 4-1mamba +- update to 4 + +* Tue Jan 01 2013 Davide Madrisan 3-1mamba +- update to 3 + +* Mon Dec 24 2012 Davide Madrisan 2-1mamba +- package created by autospec