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