#!/sbin/runscript
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# /space/gentoo/cvsroot/gentoo-x86/dev-db/postgresql/files/postgresql.rc6,v 1.1 2002/01/06 00:53:24 woodchip Exp

depend() {
	need net
}

start()	{
	ebegin "Starting postgres"
	su - $PGUSER -c "/usr/bin/pg_ctl start -D '$PGDATA' -s -l '$PGLOG' -o '$PGOPTS'"
	eend $?
}

stop ()	{
	ebegin "Stopping postgres"
	su - $PGUSER -c "/usr/bin/pg_ctl stop -D '$PGDATA' -s -m fast"
	eend $?
}

svc_restart () {
	ebegin "Restarting postgres"
	su - $PGUSER -c "/usr/bin/pg_ctl restart -D '$PGDATA' -s -m fast -l '$PGLOG' -o '$PGOPTS'"
	eend $?
}

