#!/bin/sh
# $FreeBSD: ports/mail/sqlgrey/files/sqlgrey.sh.in,v 1.4 2006/01/26 08:30:23 dougb Exp $
#
# PROVIDE: sqlgrey
# REQUIRE: LOGIN
# BEFORE: mail
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable sqlgrey:
#
# sqlgrey_enable="YES"
#
# See man sqlgrey for flags or the config file.
#
. /etc/rc.subr
name=sqlgrey
rcvar=`set_rcvar`
command=/usr/local/sbin/sqlgrey
extra_commands=reload
command_interpreter=/usr/local/bin/perl
stop_postcmd=${name}_poststop
sqlgrey_poststop()
{
rm -f $pidfile
}
load_rc_config $name
sqlgrey_enable=${sqlgrey_enable-"NO"}
sqlgrey_config=${sqlgrey_config-"/usr/local/etc/sqlgrey/sqlgrey.conf"}
sqlgrey_flags=${sqlgrey_flags-"--daemonize --configfile=${sqlgrey_config}"}
run_rc_command "$1"
syntax highlighted by Code2HTML, v. 0.9.1