[Pkg-nagios-changes] [pkg-nagios-plugins-contrib] 05/18: Add check_shutdown module from the sitesummary-client package.
Bernd Zeimetz
bernd at bzed.de
Wed Oct 1 11:13:15 UTC 2014
This is an automated email from the git hooks/post-receive script.
bzed pushed a commit to branch master
in repository pkg-nagios-plugins-contrib.
commit c5637d40cd0ec58b32951ecb2108d8ccb8d2d4aa
Author: Petter Reinholdtsen <pere at hungry.com>
Date: Thu Sep 11 10:40:33 2014 +0200
Add check_shutdown module from the sitesummary-client package.
---
check_shutdown/Makefile | 5 +++++
check_shutdown/check_shutdown | 30 ++++++++++++++++++++++++++++++
check_shutdown/control | 6 ++++++
check_shutdown/copyright | 14 ++++++++++++++
4 files changed, 55 insertions(+)
diff --git a/check_shutdown/Makefile b/check_shutdown/Makefile
new file mode 100644
index 0000000..a347ae5
--- /dev/null
+++ b/check_shutdown/Makefile
@@ -0,0 +1,5 @@
+#/usr/bin/make -f
+
+PLUGIN = check_shutdown
+
+include ../common.mk
diff --git a/check_shutdown/check_shutdown b/check_shutdown/check_shutdown
new file mode 100755
index 0000000..cd27db6
--- /dev/null
+++ b/check_shutdown/check_shutdown
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# Author: Petter Reinholdtsen <pere at hungry.com>
+# Date: 2011-02-03
+# License: GNU GPL v2 or later
+#
+# Report when a reboot is in progress. Useful to detect if
+# reboot-when-idle have been used on a server.
+
+set -e
+
+PATH=/bin:/sbin:/usr/sbin:/usr/bin
+
+shutdownpid="`pgrep '^shutdown$'|head -1`"
+
+if [ "$shutdownpid" ] ; then
+ case "`uname -s`" in
+ Linux)
+ cmd="`ps --no-headers --pid $shutdownpid -o command`"
+ echo "REBOOT IN PROGRESS: $cmd"
+ ;;
+ *)
+ echo "REBOOT IN PROGRESS"
+ ;;
+ esac
+ exit 1
+fi
+
+echo "OK - no shutdown running"
+exit 0
diff --git a/check_shutdown/control b/check_shutdown/control
new file mode 100644
index 0000000..07c6b45
--- /dev/null
+++ b/check_shutdown/control
@@ -0,0 +1,6 @@
+Uploaders: Petter Reinholdtsen <pere at hungry.com>
+Description: plugin to check LDAP server response
+ Make sure the LDAP server is able to respond by searching for the
+ root DSE.
+Recommends: procps
+Version: ?
diff --git a/check_shutdown/copyright b/check_shutdown/copyright
new file mode 100644
index 0000000..08d8906
--- /dev/null
+++ b/check_shutdown/copyright
@@ -0,0 +1,14 @@
+Copyright (C) 2011 Petter Reinholdtsen <pere at hungry.com>
+
+This program 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 program 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 <http://www.gnu.org/licenses/>.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-nagios-plugins-contrib.git
More information about the Pkg-nagios-changes
mailing list