Add dsa-check-dchroots-current
authorPeter Palfrader <peter@palfrader.org>
Thu, 13 Mar 2014 08:44:10 +0000 (09:44 +0100)
committerPeter Palfrader <peter@palfrader.org>
Thu, 13 Mar 2014 08:44:10 +0000 (09:44 +0100)
dsa-nagios-checks/checks/dsa-check-dchroots-current [new file with mode: 0755]
dsa-nagios-checks/debian/changelog

diff --git a/dsa-nagios-checks/checks/dsa-check-dchroots-current b/dsa-nagios-checks/checks/dsa-check-dchroots-current
new file mode 100755 (executable)
index 0000000..e2c5421
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+oldtars=$(find /srv/chroot -mindepth 1 -maxdepth 1 -name '*.tar.gz' -mtime +14 -printf "%f ")
+
+if [ -z "$oldtars" ]; then
+       echo "OK: All tarballs in /srv/chroot are recent"
+       exit 0
+else
+       echo "Warning: Some tarballs are old: $oldtars"
+       exit 1
+fi
index a39f1e2..0bc3ae6 100644 (file)
@@ -1,6 +1,6 @@
-dsa-nagios-checks (98) UNRELEASED; urgency=low
+dsa-nagios-checks (98) unstable; urgency=low
 
-  * 
+  * Add dsa-check-dchroots-current.
 
  -- Peter Palfrader <weasel@debian.org>  Fri, 28 Feb 2014 19:40:16 +0100