diff options
author | CoprDistGit <copr-devel@lists.fedorahosted.org> | 2022-06-13 17:40:57 +0000 |
---|---|---|
committer | CoprDistGit <copr-devel@lists.fedorahosted.org> | 2022-06-13 17:40:57 +0000 |
commit | ee333849e00320407261d042ba5c58699e4394a1 (patch) | |
tree | bc61c4e74b5b607bc24b69c863794afb7709c24a | |
parent | 37748bec3cdf30c0d766c1499130eeb5159b9992 (diff) |
automatic import of nagios-plugins-check_expire_dns_zoneHEADora8ora7opensusetumbleweedopensuse-leap15.3opensuse-leap15.2openmandrivacookermga8masterf36f35f34epel9epel8epel7el6centosstream9centosstreamcauldron
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Patch-checkexpire | 46 | ||||
-rw-r--r-- | nagios-plugins-check_expire_dns_zone.spec | 43 | ||||
-rw-r--r-- | sources | 1 |
4 files changed, 91 insertions, 0 deletions
@@ -0,0 +1 @@ +/nagios-plugins-check_expire_dns_zone-0.1.tar.gz diff --git a/Patch-checkexpire b/Patch-checkexpire new file mode 100644 index 0000000..dd93c2f --- /dev/null +++ b/Patch-checkexpire @@ -0,0 +1,46 @@ +--- checkexpire/checkexpire.sh.orig 2015-06-30 12:55:40.000000000 +0100 ++++ checkexpire/checkexpire.sh 2022-06-13 16:48:39.508124808 +0100 +@@ -34,7 +34,8 @@ + OPTIONS: + -h Show this message +- -m Master NS ++ -m Master NS + -s Slave NS + -v Verbose ++ -f Domains File + + DOMAINS FILE: +@@ -44,12 +45,5 @@ + } + +-if [ ! -f $DOMAINSFILE ] +-then +- echo "File $DOMAINSFILE not found" +- usage +- exit $STATE_UNKNOWN +-fi +- +-while getopts ":s:m:vh" opt; do ++while getopts ":s:m:f:vh" opt; do + case $opt in + s) +@@ -59,4 +53,7 @@ + DNSMAS=$OPTARG + ;; ++ f) ++ DOMAINSFILE="$DIRECTORY/$OPTARG" ++ ;; + v) + _V=1 +@@ -73,4 +70,11 @@ + done + ++if [ ! -f $DOMAINSFILE ] ++then ++ echo "File $DOMAINSFILE not found" ++ usage ++ exit $STATE_UNKNOWN ++fi ++ + if [[ -z $DNSSRV ]] || [[ -z $DNSMAS ]] + then diff --git a/nagios-plugins-check_expire_dns_zone.spec b/nagios-plugins-check_expire_dns_zone.spec new file mode 100644 index 0000000..0266443 --- /dev/null +++ b/nagios-plugins-check_expire_dns_zone.spec @@ -0,0 +1,43 @@ +# SPEC file overview: +# https://docs.fedoraproject.org/en-US/quick-docs/creating-rpm-packages/#con_rpm-spec-file-overview +# Fedora packaging guidelines: +# https://docs.fedoraproject.org/en-US/packaging-guidelines/ + + +Name: nagios-plugins-check_expire_dns_zone +Version: 0.1 +Release: 1.ndias%{?dist} +Summary: Nagios plugin to compare the slave and the master DNS nameservers SOA records + +License: GPLv2 +URL: https://github.com/alcir/nagios/tree/master/checkexpire +Source0: https://github.com/alcir/nagios/archive/refs/heads/master.zip#/%{name}-%{version}.tar.gz +Patch0: Patch-checkexpire + +BuildArch: noarch + +%description +This script uses dig to query two dns servers and to compare the SOA record. +Useful to check if a slave zone is not in sync with the master. + +%prep +%setup -q -n nagios-master + +%patch0 -p0 + +%build + + +%install +install -p -m 755 -D checkexpire/checkexpire.sh %{buildroot}/%{_libdir}/nagios/plugins/checkexpire.sh + + +%files +%doc checkexpire/README.md +%license LICENSE + +%{_libdir}/nagios/plugins/checkexpire.sh + +%changelog +* Mon Jun 13 2022 Nuno Dias <Nuno.Dias@gmail.com> - 0.1-1.ndias +- Version 0.1 @@ -0,0 +1 @@ +b845506199de93e39feee4bae50e26c8 nagios-plugins-check_expire_dns_zone-0.1.tar.gz |