80 lines
2.2 KiB
RPMSpec
80 lines
2.2 KiB
RPMSpec
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 <davide.madrisan@gmail.com>
|
|
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=<somedirectory>,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 <autodist@mambasoft.it> 7-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Sun Feb 03 2013 Davide Madrisan <davide.madrisan@gmail.com> 6-1mamba
|
|
- update to 6
|
|
|
|
* Sat Jan 12 2013 Davide Madrisan <davide.madrisan@gmail.com> 5-1mamba
|
|
- update to 5
|
|
|
|
* Wed Jan 02 2013 Davide Madrisan <davide.madrisan@gmail.com> 4-1mamba
|
|
- update to 4
|
|
|
|
* Tue Jan 01 2013 Davide Madrisan <davide.madrisan@gmail.com> 3-1mamba
|
|
- update to 3
|
|
|
|
* Mon Dec 24 2012 Davide Madrisan <davide.madrisan@gmail.com> 2-1mamba
|
|
- package created by autospec
|