Fix variable names in rc script. Breakage spotted by pea@
While here, deal with the pidfile in pre, not post. ok pea@ (maintainer)
This commit is contained in:
parent
1f9966e201
commit
a790ad3f29
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.136 2010/12/13 16:14:38 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.137 2010/12/15 11:32:26 ajacoutot Exp $
|
||||
|
||||
COMMENT-main= PostgreSQL RDBMS (client)
|
||||
COMMENT-server= PostgreSQL RDBMS (server)
|
||||
@ -12,7 +12,7 @@ PKGNAME-server= postgresql-server-${VERSION}
|
||||
PKGNAME-docs= postgresql-docs-${VERSION}
|
||||
PKGNAME-contrib=postgresql-contrib-${VERSION}
|
||||
|
||||
REVISION-server= 1
|
||||
REVISION-server= 2
|
||||
|
||||
CATEGORIES= databases
|
||||
SHARED_LIBS= ecpg 7.2 \
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $OpenBSD: postgresql.rc,v 1.2 2010/12/13 16:14:38 ajacoutot Exp $
|
||||
# $OpenBSD: postgresql.rc,v 1.3 2010/12/15 11:32:26 ajacoutot Exp $
|
||||
|
||||
. /etc/rc.d/rc.subr
|
||||
|
||||
@ -11,17 +11,17 @@ bin="${TRUEPREFIX}/bin/pg_ctl"
|
||||
datadir="/var/postgresql/data"
|
||||
|
||||
rc_start() {
|
||||
su -l -c ${_rcclass:-daemon} -s ${_rcshell:-/bin/sh} \
|
||||
${_rcuser:-root} -c \
|
||||
rm -f ${datadir}/postmaster.pid
|
||||
su -l -c ${daemon_class:-daemon} -s ${daemon_shell:-/bin/sh} \
|
||||
${daemon_user:-root} -c \
|
||||
"${bin} -D ${datadir} start -l /var/postgresql/logfile" \
|
||||
>/dev/null
|
||||
}
|
||||
|
||||
rc_stop() {
|
||||
su -l -c ${_rcclass:-daemon} -s ${_rcshell:-/bin/sh} \
|
||||
${_rcuser:-root} -c \
|
||||
"${bin} -D ${datadir} stop -m fast" >/dev/null && \
|
||||
/bin/rm -f ${datadir}/postmaster.pid
|
||||
su -l -c ${daemon_class:-daemon} -s ${daemon_shell:-/bin/sh} \
|
||||
${daemon_user:-root} -c \
|
||||
"${bin} -D ${datadir} stop -m fast" >/dev/null
|
||||
}
|
||||
|
||||
rc_cmd $1
|
||||
|
Loading…
Reference in New Issue
Block a user