[packages/nagios-plugin-check_scan: 3/5] add command definition template
glen
glen at pld-linux.org
Mon Jun 8 14:18:41 CEST 2015
commit b0bc1bec358be49257e824fe1e3ff261582e2b16
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon Jun 8 15:14:58 2015 +0300
add command definition template
check_scan.cfg | 20 ++++++++++++++++++++
nagios-plugin-check_scan.spec | 3 +++
2 files changed, 23 insertions(+)
---
diff --git a/nagios-plugin-check_scan.spec b/nagios-plugin-check_scan.spec
index 66c948c..485a430 100644
--- a/nagios-plugin-check_scan.spec
+++ b/nagios-plugin-check_scan.spec
@@ -7,6 +7,7 @@ License: GPL v2+
Group: Networking
Source0: http://www.altsec.info/check_scan.sh
# Source0-md5: 8e79becb95012c2aedf0b9c68373f928
+Source1: %{plugin}.cfg
Patch0: pld.patch
URL: http://www.altsec.info/check_scan.html
Requires: coreutils
@@ -43,11 +44,13 @@ cp -p %{SOURCE0} %{plugin}
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{plugindir},%{statedir}}
install -p %{plugin} $RPM_BUILD_ROOT%{plugindir}/%{plugin}
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
+%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.cfg
%attr(755,root,root) %{plugindir}/%{plugin}
%dir %attr(770,root,nagios) %{statedir}
diff --git a/check_scan.cfg b/check_scan.cfg
new file mode 100644
index 0000000..263b402
--- /dev/null
+++ b/check_scan.cfg
@@ -0,0 +1,20 @@
+# Usage:
+# check_scan
+define command {
+ command_name check_scan
+ command_line /usr/lib/nagios/plugins/check_scan -H $HOSTADDRESS$ $ARG1$
+}
+
+define service {
+ use generic-service
+ name template
+ service_description template
+ register 0
+
+ normal_check_interval 5
+ retry_check_interval 1
+
+ notification_interval 10
+
+ check_command check_scan
+}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nagios-plugin-check_scan.git/commitdiff/ddb074f73a0d022d05cfc8307552149cf2e713f5
More information about the pld-cvs-commit
mailing list