mirror of
https://git.freebsd.org/ports.git
synced 2025-07-08 21:09:17 -04:00
available in libc for all currently supported versions of FreeBSD. * Install the default config file into ${PREFIX}/etc/repmgr.conf.sample and uses the standard @sample plist functionality. This is where hier(7) expects config files to be installed. * Add an rc.d script to start up repmgrd automatically on system boot, which relies on the config file being in ${PREFIX}/etc/. PR: 195106 Submitted by: matthew Approved by: 5u623l20@gmail.com (maintainer)
33 lines
589 B
Bash
33 lines
589 B
Bash
#!/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"
|
|
|