ports/databases/pgcluster/files/pgreplicate.sh.tmpl
Doug Barton c49d1a3273 Remove the FreeBSD KEYWORD from all rc.d scripts where it appears.
We have not checked for this KEYWORD for a long time now, so this
is a complete noop, and thus no PORTREVISION bump. Removing it at
this point is mostly for pedantic reasons, and partly to avoid
perpetuating this anachronism by copy and paste to future scripts.
2006-02-20 20:47:50 +00:00

36 lines
709 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: pgreplicate
# REQUIRE: DAEMON
# BEFORE: pglb
#
# Add the following line to /etc/rc.conf to enable pgreplicate:
#
# pgreplicate_enable="YES"
#
pgreplicate_enable=${pgreplicate_enable-"NO"}
pgreplicate_data=${pgreplicate_data-"%%PREFIX%%/pgsql/data"}
. %%RC_SUBR%%
load_rc_config pgreplicate
name=pgreplicate
rcvar=`set_rcvar`
command=%%PREFIX%%/bin/pgreplicate
pgreplicate_user=pgsql
stop_cmd="pgreplicate_stop"
pgreplicate_flags="${pgreplicate_flags} -D ${pgreplicate_data}"
pidfile="${pgreplicate_data}/pgreplicate.pid"
pgreplicate_stop()
{
su -m ${pgreplicate_user} -c "exec ${command} -D ${pgreplicate_data} stop"
}
load_rc_config $name
run_rc_command "$1"