blob: 33f7b336890c1a6108637909c1ef13fd6f96f244 (
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
|
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: repmgrd
# REQUIRE: postgresql
# KEYWORD: shutdown
#
# Add these lines to /etc/rc.conf.local or /etc/rc.conf to enable this
# service:
#
# repmgrd_enable (bool): Set to YES to enable repmgrd. Default: NO
#
# repmgrd_config (path): Default: %%PREFIX%%/etc/repmgr.conf
#
. /etc/rc.subr
name=repmgrd
rcvar=repmgrd_enable
load_rc_config $name
: ${repmgrd_enable:="NO"}
: ${repmgrd_config="%%PREFIX%%/etc/repmgr.conf"}
command=%%PREFIX%%/sbin/${name}
pidfile=/var/run/${name}.pid
command_args="-p $pidfile -f $repmgrd_config"
run_rc_command "$1"
|