]> git.pld-linux.org Git - SPECS.git/blob - nagios-plugin-check_bacula_log.spec
SPECS updated Sun 1 Aug 11:02:02 CEST 2021
[SPECS.git] / nagios-plugin-check_bacula_log.spec
1 %define         plugin  check_bacula_log
2 Summary:        Nagios plugin to check bacula status via bacula log
3 Name:           nagios-plugin-%{plugin}
4 Version:        1.8
5 Release:        1
6 License:        GPL v2
7 Group:          Networking
8 Source0:        %{plugin}.pl
9 Source1:        %{plugin}.cfg
10 URL:            http://exchange.nagios.org/directory/Plugins/Backup-and-Recovery/Bacula/check_bacula_log/details
11 BuildRequires:  perl-devel >= 1:5.8.0
12 BuildRequires:  rpm-perlprov >= 4.1-13
13 Requires:       nagios-common
14 Requires:       nagios-plugins-libs
15 BuildArch:      noarch
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %define         _sysconfdir     /etc/nagios/plugins
19 %define         plugindir       %{_prefix}/lib/nagios/plugins
20
21 %define         _noautoreq      perl(utils)
22
23 %description
24 Nagios plugin that checks whether the backups made for today with the
25 Bacula backup system were succesful.
26
27 This requires the Nagios user to have read access to the bacula log
28 file.
29
30 %prep
31 %setup -qcT
32 ver=$(awk '/my \$REVISION/{print $(NF-1)}' %{SOURCE0})
33 if [ "$ver" != %{version} ]; then
34         exit 1
35 fi
36
37 %install
38 rm -rf $RPM_BUILD_ROOT
39 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{plugindir}}
40 install -p %{SOURCE0} $RPM_BUILD_ROOT%{plugindir}/%{plugin}
41 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
42
43 %clean
44 rm -rf $RPM_BUILD_ROOT
45
46 %files
47 %defattr(644,root,root,755)
48 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.cfg
49 %attr(755,root,root) %{plugindir}/%{plugin}
This page took 0.197094 seconds and 3 git commands to generate.