Summary: Nagios nsca integration %define name smeserver-nagios-nsca Name: %{name} %define version 1.0.1 %define release 0 Version: %{version} Release: %{release} License: GPL Group: Applications/System Source: %{name}-%{version}.tar.gz Packager: Michael Weinberger BuildRoot: /var/tmp/%{name}-buildroot/ BuildArch: noarch Requires: smeserver-release >= 7.1.3 Requires: nagios-nsca >= 2.6 AutoReq: no %changelog * Thu Oct 1 2007 Michael Weinberger - Initial release %description Nagios nsca integration Setting the TCP wrapper allowed hosts: config setprop nsca HostsAllow "127.0.0.1 10.203.104.0/255.255.252.0 172.22.32.0/255.255.240.0" expand-template /etc/hosts.allow %prep %setup %setup -q -n %{name}-%{version} %build %install rm -rf $RPM_BUILD_ROOT (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) rm -f %{name}-%{version}-filelist /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ >> %{name}-%{version}-filelist find $RPM_BUILD_ROOT -depth -type l -print |\ sed "s@^$RPM_BUILD_ROOT@@g" >> %{name}-%{version}-filelist %clean rm -rf $RPM_BUILD_ROOT %pre %post /sbin/e-smith/config printtype nsca > /dev/null || /sbin/e-smith/config set nsca service if [ "x`/bin/cat /proc/1/cmdline`" = "xinit [7]" ] ; then /sbin/e-smith/expand-template /etc/hosts.allow /sbin/e-smith/service nsca restart fi %preun if [ "x`/bin/cat /proc/1/cmdline`" = "xinit [7]" ] ; then if [ $1 = 0 ] ; then # uninstall /sbin/e-smith/service nsca stop fi fi %postun if [ "x`/bin/cat /proc/1/cmdline`" = "xinit [7]" ] ; then if [ $1 = 0 ] ; then # uninstall /sbin/e-smith/expand-template /etc/hosts.allow fi fi %files -f %{name}-%{version}-filelist %defattr(-,root,root)