25 lines
511 B
Bash
25 lines
511 B
Bash
#!/bin/sh
|
|
#
|
|
# $OpenBSD: postgresql.rc,v 1.6 2011/01/05 16:05:54 ajacoutot Exp $
|
|
|
|
daemon="${TRUEPREFIX}/bin/postgres"
|
|
daemon_user="_postgresql"
|
|
|
|
. /etc/rc.d/rc.subr
|
|
|
|
bin="${TRUEPREFIX}/bin/pg_ctl"
|
|
datadir="/var/postgresql/data"
|
|
|
|
rc_start() {
|
|
rm -f ${datadir}/postmaster.pid
|
|
${rcexec} "${bin} -D ${datadir} start -l /var/postgresql/logfile" \
|
|
>/dev/null
|
|
}
|
|
|
|
rc_stop() {
|
|
${rcexec} "${bin} -D ${datadir} stop -m fast" >/dev/null || \
|
|
${rcexec} "${bin} -D ${datadir} stop -m immediate" >/dev/null
|
|
}
|
|
|
|
rc_cmd $1
|