aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/geomWatch
diff options
context:
space:
mode:
authorpgollucci <pgollucci@FreeBSD.org>2010-01-14 12:26:41 +0800
committerpgollucci <pgollucci@FreeBSD.org>2010-01-14 12:26:41 +0800
commit8630e3cf8afa29381d9048b83cd09e52c20e0c32 (patch)
tree7acbbce53c225579ecfa43358dc40a7938032821 /sysutils/geomWatch
parent246cd45e3ca9ccbeee7faf104bb707b1350a09ef (diff)
downloadfreebsd-ports-gnome-8630e3cf8afa29381d9048b83cd09e52c20e0c32.tar.gz
freebsd-ports-gnome-8630e3cf8afa29381d9048b83cd09e52c20e0c32.tar.zst
freebsd-ports-gnome-8630e3cf8afa29381d9048b83cd09e52c20e0c32.zip
geomWatch is a program for monitoring the well-being of GEOM providers. It
checks the state of each configured provider at a configured interval, and, if it notices that a provider has lost a component, or encounters a problem while checking a provider's state, it will send an e-mail with details of the matter--such as what components were lost and which remain, or, in the event of a problem, what the problem was--to an arbitrary number of recipients, so that corrective action can be taken (for example, replacing a failed disk). WWW: http://acm.poly.edu/wiki/GEOM_Watch -Boris Kochergin <spawk@acm.poly.edu> PR: ports/142735 Submitted by: Boris Kochergin <spawk at acm.poly.edu>
Diffstat (limited to 'sysutils/geomWatch')
-rw-r--r--sysutils/geomWatch/Makefile29
-rw-r--r--sysutils/geomWatch/distinfo3
-rw-r--r--sysutils/geomWatch/files/geomWatch.in44
-rw-r--r--sysutils/geomWatch/files/pkg-message.in12
-rw-r--r--sysutils/geomWatch/pkg-descr11
5 files changed, 99 insertions, 0 deletions
diff --git a/sysutils/geomWatch/Makefile b/sysutils/geomWatch/Makefile
new file mode 100644
index 000000000000..3d3b6f84a5fc
--- /dev/null
+++ b/sysutils/geomWatch/Makefile
@@ -0,0 +1,29 @@
+# New ports collection makefile for: geomWatch
+# Date created: 11 January 2010
+# Whom: Boris Kochergin <spawk@acm.poly.edu>
+#
+# $FreeBSD$
+#
+
+PORTNAME= geomWatch
+PORTVERSION= 1.0.0
+CATEGORIES= sysutils
+MASTER_SITES= http://isis.poly.edu/~bk/geomWatch/ \
+ http://bk.macroblock.net/geomWatch/
+EXTRACT_SUFX= .tbz
+
+MAINTAINER= spawk@acm.poly.edu
+COMMENT= Watches for and e-mails admins about GEOM state changes
+
+LIB_DEPENDS= esmtp.6:${PORTSDIR}/mail/libesmtp
+
+PLIST_FILES= sbin/geomWatch \
+ etc/geomWatch.conf.sample
+
+SUB_FILES= pkg-message geomWatch
+
+post-install:
+ ${INSTALL_SCRIPT} ${WRKDIR}/geomWatch ${PREFIX}/etc/rc.d/geomWatch
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/sysutils/geomWatch/distinfo b/sysutils/geomWatch/distinfo
new file mode 100644
index 000000000000..be5d0a40bd3d
--- /dev/null
+++ b/sysutils/geomWatch/distinfo
@@ -0,0 +1,3 @@
+MD5 (geomWatch-1.0.0.tbz) = ade5c2498ff08975e70600ef065b0945
+SHA256 (geomWatch-1.0.0.tbz) = 3cad58a1ffb036f941f59b1f4699b5cf3cca6435a960639fd53f176788479501
+SIZE (geomWatch-1.0.0.tbz) = 6181
diff --git a/sysutils/geomWatch/files/geomWatch.in b/sysutils/geomWatch/files/geomWatch.in
new file mode 100644
index 000000000000..275d358113c1
--- /dev/null
+++ b/sysutils/geomWatch/files/geomWatch.in
@@ -0,0 +1,44 @@
+#!/bin/sh
+# $FreeBSD
+
+# PROVIDE: geomwatch
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: shutdown
+
+# Define these geomwatch_* variables in one of these files:
+# /etc/rc.conf
+# /etc/rc.conf.local
+# /etc/rc.conf.d/geomwatch
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+geomwatch_enable="${geomwatch_enable-NO}"
+geomwatch_pidfile="/var/run/geomWatch.pid"
+
+. /etc/rc.subr
+
+name="geomwatch"
+rcvar=`set_rcvar`
+command="%%PREFIX%%/sbin/geomWatch"
+
+load_rc_config $name
+
+: ${geomwatch_config="%%PREFIX%%/etc/geomWatch.conf"}
+: ${geomwatch_flags="-c ${geomwatch_config}"}
+
+pidfile="${geomwatch_pidfile}"
+required_files="${geomwatch_config}"
+
+case "${geomwatch_flags}" in
+*-p\ *)
+ echo "ERROR: \$geomwatch_flags includes -p option." \
+ "Please use \$geomwatch_pidfile instead."
+ exit 1
+ ;;
+*)
+ geomwatch_flags="-p ${pidfile} ${geomwatch_flags}"
+ ;;
+esac
+
+run_rc_command "$1"
diff --git a/sysutils/geomWatch/files/pkg-message.in b/sysutils/geomWatch/files/pkg-message.in
new file mode 100644
index 000000000000..915ca9e81240
--- /dev/null
+++ b/sysutils/geomWatch/files/pkg-message.in
@@ -0,0 +1,12 @@
+
+A sample geomWatch configuration file has been installed as
+%%PREFIX%%/etc/smartd.conf.sample. You should copy it to
+%%PREFIX%%/etc/smartd.conf, edit it to your liking, and add the following line
+to /etc/rc.conf:
+
+geomwatch_enable="YES"
+
+Finally, to start geomWatch, run the following command:
+
+%%PREFIX%%/etc/rc.d/geomWatch start
+
diff --git a/sysutils/geomWatch/pkg-descr b/sysutils/geomWatch/pkg-descr
new file mode 100644
index 000000000000..8f351828c919
--- /dev/null
+++ b/sysutils/geomWatch/pkg-descr
@@ -0,0 +1,11 @@
+geomWatch is a program for monitoring the well-being of GEOM providers. It
+checks the state of each configured provider at a configured interval, and, if
+it notices that a provider has lost a component, or encounters a problem while
+checking a provider's state, it will send an e-mail with details of the
+matter--such as what components were lost and which remain, or, in the event of
+a problem, what the problem was--to an arbitrary number of recipients, so that
+corrective action can be taken (for example, replacing a failed disk).
+
+WWW: http://acm.poly.edu/wiki/GEOM_Watch
+
+-Boris Kochergin <spawk@acm.poly.edu>