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

# spec file for package monitoring-plugins-systemd
# Copyright (c) 2019, Martin Hauke <>
# 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

%define         realname check_systemd
Name:           monitoring-plugins-systemd
Version:        2.0.11
Release:        0
Summary:        This plugin for Nagios/Icinga checks systemd for failed units
License:        GPL-2.0-only
Group:          System/Monitoring
BuildRequires:  fdupes
BuildRequires:  nagios-rpm-macros
BuildRequires:  python3-nagiosplugin
BuildRequires:  python3-setuptools
# SECTION test requirements
BuildRequires:  python3-jfscripts
BuildRequires:  python3-nose
Requires:       python3-nagiosplugin
BuildArch:      noarch

This plugin for Nagios/Icinga checks systemd for failed units.

%setup -q -n %{realname}-%{version}
sed 's|#!%{_bindir}/env python3|#!%{_bindir}/python3|' -i


install -d %{buildroot}/%{nagios_plugindir}
cp %{buildroot}%{_bindir}/ %{buildroot}/%{nagios_plugindir}/check_systemd
rm %{buildroot}%{_bindir}/check_systemd*
%fdupes %{buildroot}%{python3_sitelib}

export PATH=$PATH:%{buildroot}%{nagios_plugindir}
nosetests -v

%license LICENSE
%dir %{nagios_libdir}
%dir %{nagios_plugindir}

openSUSE Build Service is sponsored by