Files
ports/databases/postgresql/pkg/postgresql.rc
T
rpe 9a8b5ccd06 Change the shebang line from /bin/sh to /bin/ksh in all ports rc.d
daemon scripts and bump subpackages that contain the *.rc scripts.

discussed with and OK aja@
OK tb
2018-01-11 19:27:01 +00:00

34 lines
618 B
Bash

#!/bin/ksh
#
# $OpenBSD: postgresql.rc,v 1.12 2018/01/11 19:27:01 rpe Exp $
datadir="/var/postgresql/data"
daemon="${TRUEPREFIX}/bin/pg_ctl"
daemon_flags="-w -l /var/postgresql/logfile"
daemon_user="_postgresql"
. /etc/rc.d/rc.subr
rc_usercheck=NO
rc_check() {
${rcexec} "${daemon} -D ${datadir} status"
}
rc_reload() {
${rcexec} "${daemon} -D ${datadir} reload"
}
rc_start() {
rm -f ${datadir}/postmaster.pid
${rcexec} "${daemon} -D ${datadir} start ${daemon_flags}"
}
rc_stop() {
${rcexec} "${daemon} -D ${datadir} stop -m fast" || \
${rcexec} "${daemon} -D ${datadir} stop -m immediate"
}
rc_cmd $1