summaryrefslogtreecommitdiff
path: root/databases/pgcluster/files/pglb.in
blob: 11a60b985071841e11ba292529bf9483209fe5a2 (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: /tmp/pcvs/ports/databases/pgcluster/files/Attic/pglb.in,v 1.3 2010-03-27 00:12:48 dougb Exp $
#
# PROVIDE: pglb
# REQUIRE: DAEMON
#
# Add the following line to /etc/rc.conf to enable pglb:
#
# pglb_enable="YES"
#

. /etc/rc.subr

name="pglb"
rcvar=`set_rcvar`

command=%%PREFIX%%/bin/${name}

load_rc_config $name

: ${pglb_enable="NO"}
: ${pglb_data="%%PREFIX%%/pgsql/data"}

pglb_user=pgsql
pglb_flags="${pglb_flags} -D ${pglb_data}"

stop_cmd="pglb_stop"

pglb_stop()
{
    su -m ${pglb_user} -c "exec ${command} -D ${pglb_data} stop"
}

run_rc_command "$1"