ports/sysutils/geomWatch/files/geomWatch.in
Philip M. Gollucci 55ccadad19 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>
2010-01-14 04:26:41 +00:00

45 lines
866 B
Bash

#!/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"