blob: a42f9465e41103ff0b0e9796ff9864f155d882d6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#!/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`
extra_commands="reload"
command="%%PREFIX%%/bin/pgbouncer"
config_file="%%PREFIX%%/etc/$name.ini"
command_args="-d ${config_file}"
pidfile="%%PGBOUNCER_RUNDIR%%/$name.pid"
required_files="${config_file}"
# read configuration and set defaults
load_rc_config "$name"
: ${pgbouncer_enable="NO"}
: ${pgbouncer_user="%%PGBOUNCER_USER%%"}
: ${pgbouncer_flags=""}
run_rc_command "$1"
|