freebsd-ports/databases/pgpool-II/files/pgpool.in
Marcus Alves Grando 15b73f9e08 - Add rc.d script.
- Bump PORTREVISION

PR:		94137
Submitted by:	Chris St Denis <chris___ctgameinfo.com>
Approved by:	maintainer timeout, 39 days
2006-04-14 18:40:59 +00:00

34 lines
671 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: pgpool
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# pgpool_enable (bool): Set to NO by default.
# Set it to YES to enable pgpool.
# pgpool_conf (file): Set location of your config.
# Default is "%%PREFIX%%/etc/pgpool.conf"
#
. %%RC_SUBR%%
name=pgpool
rcvar=${name}_enable
load_rc_config $name
: ${pgpool_enable="NO"}
: ${pgpool_conf="%%PREFIX%%/etc/pgpool.conf"}
command="%%PREFIX%%/bin/pgpool"
command_args="-f ${pgpool_conf}"
stop_cmd="${command} ${command_args} stop"
required_files="${pgpool_conf}"
run_rc_command "$1"