#!/bin/sh
#
# $NetBSD: pgpool2.sh,v 1.1 2016/03/11 21:30:55 fhajny Exp $
#
# PROVIDE: pgpool2
# REQUIRE: DAEMON network
# KEYWORD: shutdown

if [ -f /etc/rc.subr ]; then
	. /etc/rc.subr
fi

name="pgpool2"
rcvar=$name
command="/usr/pkg/bin/pgpool"
pgpool_user="pgpool"

if [ -f /etc/rc.subr ]; then
        load_rc_config $name
	run_rc_command "$1"
else
	echo -n "${name}"
	/usr/bin/su -m ${pgpool_user} -c "${command}"
fi
