1 %define plugin check_scan
2 Summary: A nmap scanner plugin for Nagios
3 Name: nagios-plugin-%{plugin}
8 Source0: http://www.altsec.info/check_scan.sh
9 # Source0-md5: 8e79becb95012c2aedf0b9c68373f928
10 Source1: %{plugin}.cfg
12 URL: http://www.altsec.info/check_scan.html
15 Requires: nagios-common
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 %define _sysconfdir /etc/nagios/plugins
21 %define nrpeddir /etc/nagios/nrpe.d
22 %define plugindir %{_prefix}/lib/nagios/plugins
23 %define statedir /var/lib/nagios/check_scan
26 A nmap scanner plugin for Nagios
29 - On the initial scan, it creates a baseline scan for future
31 - On each subsequent check, it compares the new scan against the
33 - Changes are reported in "warning" status, showing the open port.
35 check_scan.sh does a "TCP connect scan", so it doesn't have to run as
40 cp -p %{SOURCE0} %{plugin}
44 rm -rf $RPM_BUILD_ROOT
45 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{plugindir},%{statedir}/{files,scans}}
46 install -p %{plugin} $RPM_BUILD_ROOT%{plugindir}/%{plugin}
47 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
50 rm -rf $RPM_BUILD_ROOT
53 %defattr(644,root,root,755)
54 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.cfg
55 %attr(755,root,root) %{plugindir}/%{plugin}
56 %dir %attr(750,root,nagios) %{statedir}
57 %dir %attr(770,root,nagios) %{statedir}/files
58 %dir %attr(770,root,nagios) %{statedir}/scans