summaryrefslogtreecommitdiff
blob: 048123e78e8ebfad10584130a6925a9663c4e42f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-db/pgcluster/files/pgreplicate.init-1.3.0b,v 1.1 2005/02/27 07:20:28 nakano Exp $

depend() {
	use net
}

start() {
	ebegin "Starting PGCluster Replication Server"
	if [ -f /var/lib/pgcluster/pgreplicate.pid ]; then
		rm /var/lib/pgcluster/pgreplicate.pid
	fi
	su - $PGUSER -c "/usr/bin/pgreplicate -W /var/lib/pgcluster -D /etc/pgcluster"
	eend $?
}

stop() {
	ebegin "Stopping PGCluster Replication Server"
	su - $PGUSER -c "/usr/bin/pgreplicate -W /var/lib/pgcluster -D /etc/pgcluster stop"
	eend $?
}