# HG changeset patch # User Matthias Förste # Date 1592918775 -7200 # Node ID 030a32098005caa86d82a21079fe9eef84758506 # Parent 2a870ac68ea91794331bfbfc773b3aedb00ec55d Moved to git! diff -r 2a870ac68ea9 -r 030a32098005 Makefile --- a/Makefile Mon May 23 16:33:33 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -SCRIPTS = check_avastlicense -CLEANFILES = $(SCRIPTS) -DESTDIR = -prefix = /usr - -plugindir = $(prefix)/lib/nagios/plugins/ius - -.PHONY: all clean install - -all: $(SCRIPTS) - -clean: - rm -rf $(CLEANFILES) - -install: all - install -d -m 0755 $(DESTDIR)/$(plugindir) - install -m 0755 $(SCRIPTS) $(DESTDIR)/$(plugindir)/ - -%: %.sh - # $@ - @sh -n $< - @cp $< $@ diff -r 2a870ac68ea9 -r 030a32098005 README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README Tue Jun 23 15:26:15 2020 +0200 @@ -0,0 +1,1 @@ +moved to git! diff -r 2a870ac68ea9 -r 030a32098005 check_avastlicense.sh --- a/check_avastlicense.sh Mon May 23 16:33:33 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -#!/bin/sh -e - -ME=$0 - -e=3 -s='UNKNOWN' - -trap 'trap - EXIT; exit "${e}"' INT QUIT TERM EXIT - -die() { - echo "$ME: $@" >&2 - exit -} - - -FILE='/etc/avast/license.avastlic' -# in seconds -CRITICAL=$((7*24*60*60)) -WARNING=$((2*CRITICAL)) -PATTERN='^UpdateValidThru=[0-9]+' -DELIMITER='=' -NAME='AVASTLICENSE' - -while getopts "f:w:c:" opt; do - case $opt in - c) - CRITICAL="$OPTARG" - ;; - d) - DELIMITER="$OPTARG" - ;; - f) - FILE="$OPTARG" - ;; - p) - PATTERN="$OPTARG" - ;; - w) - WARNING="$OPTARG" - ;; - esac -done -shift $((OPTIND-1)) - -now=$(date +%s) -expires=$(grep -E $PATTERN $FILE | cut -d$DELIMITER -f2) - -[ -n "$expires" ] || die 'Expiry not found!' - -left=$((expires - now)) -if [ $left -le $CRITICAL ]; then - e=2 - s='CRITICAL' -elif [ $left -le $WARNING ]; then - e=1 - s='WARNING' -elif [ $left -gt 0 ]; then - e=0 - s='OK' -else - die 'this should not happen unless $CRITICAL & $WARNING are negative; this is not supported' -fi - -echo "$NAME $s: file '$FILE' expires at $(date -d @$expires)" diff -r 2a870ac68ea9 -r 030a32098005 debian/changelog --- a/debian/changelog Mon May 23 16:33:33 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -monitoring-plugin-avastlicense (0.1) oldoldstable oldstable stable; urgency=low - - * Initial release - - -- Matthias Förste Mon, 23 May 2016 14:08:14 +0200 diff -r 2a870ac68ea9 -r 030a32098005 debian/compat --- a/debian/compat Mon May 23 16:33:33 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -9 diff -r 2a870ac68ea9 -r 030a32098005 debian/control --- a/debian/control Mon May 23 16:33:33 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -Source: monitoring-plugin-avastlicense -Section: net -Priority: optional -Maintainer: Matthias Förste -Build-Depends: debhelper (>= 9) -Standards-Version: 3.9.5 -Homepage: https://ssl.schlittermann.de/hg/ius/nagios/monitoring-plugin-avastlicense/ -#Vcs-Git: git://anonscm.debian.org/collab-maint/monitoring-plugin-avastlicense.git -#Vcs-Browser: http://anonscm.debian.org/?p=collab-maint/monitoring-plugin-avastlicense.git;a=summary - -Package: monitoring-plugin-avastlicense -Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: check avast license file expiry diff -r 2a870ac68ea9 -r 030a32098005 debian/copyright --- a/debian/copyright Mon May 23 16:33:33 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ - -Files: * -Copyright: 2016 Matthias Förste -License: GPL-2+ - -Files: debian/* -Copyright: 2016 Matthias Förste -License: GPL-2+ - This package is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - . - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - . - You should have received a copy of the GNU General Public License - along with this program. If not, see - . - On Debian systems, the complete text of the GNU General - Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". diff -r 2a870ac68ea9 -r 030a32098005 debian/docs diff -r 2a870ac68ea9 -r 030a32098005 debian/rules --- a/debian/rules Mon May 23 16:33:33 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -#!/usr/bin/make -f -# See debhelper(7) (uncomment to enable) -# output every command that modifies files on the build system. -#DH_VERBOSE = 1 - -# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* -DPKG_EXPORT_BUILDFLAGS = 1 -include /usr/share/dpkg/default.mk - -# see FEATURE AREAS in dpkg-buildflags(1) -#export DEB_BUILD_MAINT_OPTIONS = hardening=+all - -# see ENVIRONMENT in dpkg-buildflags(1) -# package maintainers to append CFLAGS -#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic -# package maintainers to append LDFLAGS -#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed - - -# main packaging script based on dh7 syntax -%: - dh $@ - -# debmake generated override targets -# This is example for Cmake (See http://bugs.debian.org/641051 ) -#override_dh_auto_configure: -# dh_auto_configure -- \ -# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) - - - - diff -r 2a870ac68ea9 -r 030a32098005 debian/source/format --- a/debian/source/format Mon May 23 16:33:33 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -3.0 (native)