From f5d4cde8b54e9eb4372de506ce68748ec0945084 Mon Sep 17 00:00:00 2001 From: Pall Sigurdsson Date: Mon, 27 Jan 2014 09:42:40 +0000 Subject: [PATCH] spec file for check_msa_hardware-pl added --- check_msa_hardware-pl/check_msa_hardware-pl | 0 .../nagios-okplugin-check_msa.spec | 50 +++++++++++++++++++ 2 files changed, 50 insertions(+) mode change 100644 => 100755 check_msa_hardware-pl/check_msa_hardware-pl create mode 100644 check_msa_hardware-pl/nagios-okplugin-check_msa.spec diff --git a/check_msa_hardware-pl/check_msa_hardware-pl b/check_msa_hardware-pl/check_msa_hardware-pl old mode 100644 new mode 100755 diff --git a/check_msa_hardware-pl/nagios-okplugin-check_msa.spec b/check_msa_hardware-pl/nagios-okplugin-check_msa.spec new file mode 100644 index 0000000..5e18240 --- /dev/null +++ b/check_msa_hardware-pl/nagios-okplugin-check_msa.spec @@ -0,0 +1,50 @@ +%define debug_package %{nil} +%define plugin check_storwize +%define packager Pall Sigurdsson + +Summary: A Nagios plugin to check status of an MSA (HP P2000) disk array +Name: nagios-okplugin-%{plugin} +Version: 1.0.0 +Release: 1%{?dist} +License: GPLv3+ +Group: Applications/System +URL: https://github.com/opinkerfi/nagios-plugins/tree/master/%{plugin} +Source0: https://github.com/opinkerfi/nagios-plugins/tree/master/%{plugin}/releases/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Packager: %{packager} +BuildArch: noarch +Requires: pynag + + +%description +Checks status of a remote MSA disk array, also known as HP P2000 +%prep +%setup -q + +%build + + +%install +rm -rf %{buildroot} +install -D -p -m 0755 %{plugin} %{buildroot}%{_libdir}/nagios/plugins/%{plugin} +mkdir -p %{buildroot}%{_sysconfdir}/nrpe.d +sed "s^/usr/lib64^%{_libdir}^g" nrpe.d/%{plugin}.cfg > %{buildroot}%{_sysconfdir}/nrpe.d/%{plugin}.cfg + +# Temporary fix for selinux +chcon system_u:object_r:nagios_unconfined_plugin_exec_t:s0 %{plugin} %{buildroot}%{_libdir}/nagios/plugins/%{plugin} + +%clean +rm -rf %{buildroot} + +%post +/sbin/service nrpe status &> /dev/null && /sbin/service nrpe reload || : + +%files +%defattr(-,root,root,-) +%doc README.md +%{_libdir}/nagios/plugins/* +%config(noreplace) %{_sysconfdir}/nrpe.d/%{plugin}.cfg + +%changelog +* Fri Jan 27 2014 Pall Sigurdsson 1.0.0-1 +- Initial Packaging