1 |
Summary: Nagios backup integration |
2 |
%define name smeserver-nagios-backup |
3 |
Name: %{name} |
4 |
%define version 1.0.3 |
5 |
%define release 0 |
6 |
Version: %{version} |
7 |
Release: %{release}%{?dist} |
8 |
License: GPL |
9 |
Group: Applications/System |
10 |
Source: %{name}-%{version}.tar.gz |
11 |
BuildRoot: /var/tmp/%{name}-buildroot/ |
12 |
BuildArch: noarch |
13 |
Requires: smeserver-release >= 7.1.3 |
14 |
Requires: nagios >= 2.9 |
15 |
BuildRequires: e-smith-devtools |
16 |
AutoReq: no |
17 |
|
18 |
%changelog |
19 |
* Mon Dec 03 2007 Michael Weinberger <mweinber@neddix.de> |
20 |
Version 1.0.3 |
21 |
included rrd database of nagios grapher |
22 |
* Sun Oct 21 2007 Michael Weinberger <mweinber@neddix.de> |
23 |
- Initial release |
24 |
|
25 |
%description |
26 |
Nagios backup integration |
27 |
requires the following nagios configuration: |
28 |
|
29 |
log_file=/var/log/nagios/nagios.log |
30 |
log_archive_path=/var/log/nagios/archives |
31 |
state_retention_file=/var/log/nagios/retention.dat |
32 |
|
33 |
and all config files and directories must be located in /etc/nagios/ |
34 |
(cfg_file and cfg_dir settings) |
35 |
|
36 |
%prep |
37 |
%setup -q -n %{name}-%{version} |
38 |
|
39 |
%build |
40 |
mkdir -p root/home/e-smith/db/nagios |
41 |
|
42 |
%install |
43 |
rm -rf $RPM_BUILD_ROOT |
44 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
45 |
rm -f %{name}-%{version}-filelist |
46 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
47 |
--dir /home/e-smith/db/nagios 'attr(0750,root,admin)' \ |
48 |
>> %{name}-%{version}-filelist |
49 |
|
50 |
%clean |
51 |
rm -rf $RPM_BUILD_ROOT |
52 |
|
53 |
%post |
54 |
if [ "x`/bin/cat /proc/1/cmdline`" = "xinit [7]" ] ; then |
55 |
echo -n |
56 |
fi |
57 |
|
58 |
%preun |
59 |
if [ "x`/bin/cat /proc/1/cmdline`" = "xinit [7]" ] ; then |
60 |
echo -n |
61 |
fi |
62 |
|
63 |
|
64 |
%postun |
65 |
if [ "x`/bin/cat /proc/1/cmdline`" = "xinit [7]" ] ; then |
66 |
if [ $1 = 0 ] ; then # uninstall |
67 |
echo -n |
68 |
fi |
69 |
fi |
70 |
|
71 |
%files -f %{name}-%{version}-filelist |
72 |
%defattr(-,root,root) |