Files
ports/databases/pgcluster/files/pgreplicate.in
T
Rong-En Fan 505427c489 - Patch configure.in so it accepts --infodir option [1]
- While I'm here, use USE_RC_SUBR facility for rc scripts
- Other cosmetic changes

Reported by:	pointyhat exp run
2007-07-16 10:53:48 +00:00

37 lines
810 B
Bash

#!/bin/sh
#
# $FreeBSD: /tmp/pcvs/ports/databases/pgcluster/files/Attic/pgreplicate.in,v 1.1 2007-07-16 10:53:48 rafan Exp $
#
# 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"