2007-07-22 21:02:40 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: pgbouncer
|
|
|
|
# REQUIRE: LOGIN
|
|
|
|
# BEFORE: securelevel
|
|
|
|
# KEYWORD: shutdown
|
|
|
|
|
|
|
|
# Add the following line to /etc/rc.conf to enable `pgbouncer':
|
|
|
|
#
|
|
|
|
#pgbouncer_enable="YES"
|
|
|
|
#
|
|
|
|
|
|
|
|
. "%%RC_SUBR%%"
|
|
|
|
|
|
|
|
name="pgbouncer"
|
|
|
|
rcvar=`set_rcvar`
|
|
|
|
|
2008-08-11 22:09:15 +02:00
|
|
|
extra_commands="reload"
|
|
|
|
|
2007-07-22 21:02:40 +02:00
|
|
|
command="%%PREFIX%%/bin/pgbouncer"
|
|
|
|
config_file="%%PREFIX%%/etc/$name.ini"
|
|
|
|
command_args="-d ${config_file}"
|
2008-08-11 22:09:15 +02:00
|
|
|
pidfile="%%PGBOUNCER_RUNDIR%%/$name.pid"
|
2007-07-22 21:02:40 +02:00
|
|
|
required_files="${config_file}"
|
|
|
|
|
|
|
|
# read configuration and set defaults
|
|
|
|
load_rc_config "$name"
|
|
|
|
: ${pgbouncer_enable="NO"}
|
2008-08-11 22:09:15 +02:00
|
|
|
: ${pgbouncer_user="%%PGBOUNCER_USER%%"}
|
2007-07-22 21:02:40 +02:00
|
|
|
: ${pgbouncer_flags=""}
|
|
|
|
|
|
|
|
run_rc_command "$1"
|