aboutsummaryrefslogtreecommitdiff
path: root/databases/pgcluster/files/pglb.sh.tmpl
blob: f0d53ec3dec1f81f94131d9bb43c24a56d51b9dc (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: pglb
# REQUIRE: DAEMON
# KEYWORD: FreeBSD
#
# Add the following line to /etc/rc.conf to enable pglb:
#
# pglb_enable="YES"
#

pglb_enable="NO"
pglb_data="%%PREFIX%%/pgsql/data"
pglb_flags=""

. %%RC_SUBR%%

load_rc_config pglb

name=pglb
command=%%PREFIX%%/bin/pglb
pglb_user=pgsql
stop_cmd="pglb_stop"

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

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

load_rc_config $name
run_rc_command "$1"