Move to using daemon_user.

ok pea@ (maintainer)
This commit is contained in:
ajacoutot 2010-12-13 16:14:38 +00:00
parent 73ebcb7514
commit a973364d79
4 changed files with 13 additions and 12 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.135 2010/11/26 07:18:59 espie Exp $
# $OpenBSD: Makefile,v 1.136 2010/12/13 16:14:38 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= 0
REVISION-server= 1
CATEGORIES= databases
SHARED_LIBS= ecpg 7.2 \

View File

@ -1,21 +1,25 @@
#!/bin/sh
#
# $OpenBSD: postgresql.rc,v 1.1 2010/11/08 14:12:24 pea Exp $
# $OpenBSD: postgresql.rc,v 1.2 2010/12/13 16:14:38 ajacoutot Exp $
. /etc/rc.d/rc.subr
daemon="${TRUEPREFIX}/bin/postgres"
daemon_user="_postgresql"
bin="${TRUEPREFIX}/bin/pg_ctl"
datadir="/var/postgresql/data"
rc_start() {
/usr/bin/su -l _postgresql -c \
su -l -c ${_rcclass:-daemon} -s ${_rcshell:-/bin/sh} \
${_rcuser:-root} -c \
"${bin} -D ${datadir} start -l /var/postgresql/logfile" \
>/dev/null
}
rc_stop() {
/usr/bin/su -l _postgresql -c \
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
}

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.3 2010/11/19 22:31:39 espie Exp $
# $OpenBSD: Makefile,v 1.4 2010/12/13 16:14:38 ajacoutot Exp $
COMMENT = network traffic monitor
DISTNAME = vnstat-1.10
CATEGORIES = net sysutils
REVISION = 0
REVISION = 1
HOMEPAGE = http://humdi.net/vnstat/

View File

@ -1,18 +1,15 @@
#!/bin/sh
#
# $OpenBSD: vnstatd.rc,v 1.1 2010/11/08 13:20:44 pea Exp $
# $OpenBSD: vnstatd.rc,v 1.2 2010/12/13 16:14:38 ajacoutot Exp $
. /etc/rc.d/rc.subr
daemon="${TRUEPREFIX}/sbin/vnstatd"
daemon_flags="-d"
daemon_user="_vnstat"
rc_pre() {
/usr/bin/install -d -o _vnstat /var/run/vnstat
}
rc_start() {
/usr/bin/su -l _vnstat -c "${daemon} ${daemon_flags}" > /dev/null
}
rc_cmd $1