aboutsummaryrefslogtreecommitdiffstats
path: root/databases/pgcluster/files/pgreplicate.in
diff options
context:
space:
mode:
Diffstat (limited to 'databases/pgcluster/files/pgreplicate.in')
-rw-r--r--databases/pgcluster/files/pgreplicate.in36
1 files changed, 36 insertions, 0 deletions
diff --git a/databases/pgcluster/files/pgreplicate.in b/databases/pgcluster/files/pgreplicate.in
new file mode 100644
index 000000000000..0ee716fdd1b5
--- /dev/null
+++ b/databases/pgcluster/files/pgreplicate.in
@@ -0,0 +1,36 @@
+#!/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"