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

# spec file for package monitoring-plugins-webpage_sync
# Copyright (c) 2017 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-webpage_sync
Version:        0.3
Release:        0
License:        BSD-3-Clause
Summary:        Check via timestamp file, if a webpage is synced
Group:          System/Monitoring
Source:         check_webpage_sync
Source10:       monitoring-plugins-webpage_sync-rpmlintrc
BuildRequires:  nagios-rpm-macros
BuildArch:      noarch
Requires:       bc
Requires:       wget
Requires:       bash
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

This script downloads a given file from a webserver and compared the 
timestamp in the file with the current time. 

That allows to validate for example if the directory on the webserver 
is synced often enough with the real source. 

All that's needed for this script is a file that contains (in the first
body line) a timestamp in the form $(date +"%Y-%m-%d %H:%M:%%S"), for
example:'2017-11-25 20:00:00'. This line will be compared with the 
current time.

install -D -m755 %{SOURCE0} %buildroot/%{nagios_plugindir}/check_webpage_sync

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