1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-21 04:06:46 +00:00
freebsd-ports/sysutils/monit/files/monit.in
Doug Barton 9aac569eaa Move the rc.d scripts of the form *.sh.in to *.in
Where necessary add $FreeBSD$ to the file

No PORTREVISION bump necessary because this is a no-op
2012-08-05 23:19:36 +00:00

43 lines
909 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: monit
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable monit:
# monit_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable monit
# monit_flags (str): Flags passed to monit on startup.
# Default is "".
#
. /etc/rc.subr
name="monit"
rcvar=monit_enable
restart_precmd="monit_checkconfig"
reload_precmd="monit_checkconfig"
[ -z "$monit_enable" ] && monit_enable="NO"
load_rc_config $name
default_config=%%PREFIX%%/etc/monitrc
required_files=${default_config}
command="%%PREFIX%%/bin/monit"
command_args="-c ${default_config}"
pidfile="/var/run/monit.pid"
monit_checkconfig()
{
echo "Performing sanity check on monit configuration:"
${command} ${command_args} -t
}
extra_commands="reload"
run_rc_command "$1"