When creating rrdcached's /var/run directory in rc_pre, set ownership to

${daemon_user} rather than hardcoded _rrdcached.
This commit is contained in:
sthen 2017-07-12 23:46:30 +00:00
parent 599c860dd8
commit 02a825e6d4
2 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.102 2017/05/18 13:51:42 sthen Exp $
# $OpenBSD: Makefile,v 1.103 2017/07/12 23:46:30 sthen Exp $
COMMENT-main= system to store and display time-series data
COMMENT-update= lightweight update-only tool for rrdtool
@ -12,6 +12,7 @@ PKGNAME-main= ${DISTNAME}
PKGNAME-update= rrdupdate-${VERSION}
PKGNAME-python= py-rrd-${VERSION}
PKGNAME-ruby= ruby-rrd-${VERSION}
REVISION-main= 0
SHARED_LIBS += rrd 5.2 # 9.0

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $OpenBSD: rrdcached.rc,v 1.2 2014/04/26 20:57:59 sthen Exp $
# $OpenBSD: rrdcached.rc,v 1.3 2017/07/12 23:46:30 sthen Exp $
daemon="${TRUEPREFIX}/bin/rrdcached"
daemon_flags="-b /var/db/rrd -m 770 -l unix:/var/run/rrd/rrdcached.sock -j /var/db/rrd/journal -p /var/run/rrd/rrdcached.pid"
@ -11,7 +11,7 @@ daemon_user="_rrdcached"
rc_reload=NO
rc_pre() {
install -d -o _rrdcached -g _rrdcached -m 750 /var/run/rrd
install -d -o ${daemon_user} -g _rrdcached -m 750 /var/run/rrd
}
rc_cmd $1