File monitoring-plugins-susefirewall.spec of Package monitoring-plugins-susefirewall

# spec file for package monitoring-plugins-susefirewall 
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           monitoring-plugins-susefirewall
Version:        1.0.0
Release:        100
License:        GPL-3.0+
Summary:        Monitoring plugin to check openSUSE Firewall
Group:          System/Monitoring

Source1:        LICENSE
Source2:        README

BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
BuildRequires:  nagios-rpm-macros
Provides:       nagios-plugins-susefirewall = %{version}-%{release}
Obsoletes:      nagios-plugins-susefirewall < %{version}-%{release}

This plugin will check if openSUSE Firewall is running.

Example of command definitions for Nagios 3.x:

define command{
  command_name	check_susefirewall
  command_line	$USER1$/

%{__cp} %{SOURCE1} ./LICENSE
%{__cp} %{SOURCE2} ./README


%{__mkdir} -p %{buildroot}/%{nagios_plugindir}
%{__install} -D -m755 %{SOURCE0} %{buildroot}/%{nagios_plugindir}/

%{__rm} -rf %{buildroot}

%dir %{nagios_libdir}
%dir %{nagios_plugindir}