ports/mail/sqlgrey/files/sqlgrey.in
Martin Matuska e24792fc91 Update SQLgrey to 1.8.0
Use UIDs/GIDs infractructure (new uid/gid 226)

PR:		ports/165103
Approved by:	maintainer
2012-02-14 10:47:37 +00:00

40 lines
722 B
Bash

#!/bin/sh
# $FreeBSD$
#
# 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=sqlgrey_enable
command=%%PREFIX%%/sbin/sqlgrey
extra_commands=reload
command_interpreter=%%PERL%%
stop_postcmd=${name}_poststop
load_rc_config $name
sqlgrey_enable=${sqlgrey_enable-"NO"}
required_files=${sqlgrey_config-"%%PREFIX%%/%%ETCDIR%%/sqlgrey.conf"}
pidfile=${sqlgrey_pidfile-"/var/run/sqlgrey.pid"}
command_args="--configfile=${required_files} --pidfile=${pidfile} --daemonize"
sqlgrey_poststop()
{
rm -f $pidfile
}
run_rc_command "$1"