freebsd-ports/mail/sqlgrey/files/sqlgrey.sh.in
Mathieu Arnold 9b565cbd93 Fix sqlgrey.conf's path in sqlgrey.sh [1]
fixup a few other things while I'm there
bump PORTREVISION

Poked by: flz [1]
2005-05-23 14:27:20 +00:00

47 lines
907 B
Bash

#!/bin/sh
# $FreeBSD$
#
# PROVIDE: sqlgrey
# REQUIRE: LOGIN
# BEFORE: mail
# KEYWORD: FreeBSD shutdown
#
# Add the following lines to /etc/rc.conf to enable sqlgrey:
#
# sqlgrey_enable="YES"
#
# See man sqlgrey for flags or the config file.
#
. %%RC_SUBR%%
name=sqlgrey
rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/sqlgrey
extra_commands=reload
command_interpreter=%%PERL%%
stop_postcmd=stop_postcmd
stop_postcmd()
{
rm -f $pidfile
}
# set defaults
sqlgrey_enable=${sqlgrey_enable:-"NO"}
sqlgrey_pidfile=${sqlgrey_pidfile:-"/var/run/sqlgrey.pid"}
sqlgrey_listen=${sqlgrey_listen:-"2501"}
sqlgrey_config=${sqlgrey_config:-"/usr/local/%%ETCDIR%%/sqlgrey.conf"}
sqlgrey_flags=${sqlgrey_flags:-"--pidfile=${sqlgrey_pidfile} \
--inet=${sqlgrey_listen} --daemonize --user=sqlgrey --group=sqlgrey \
--configfile=${sqlgrey_config}"}
pidfile="${sqlgrey_pidfile}"
load_rc_config $name
run_rc_command "$1"